Git Product home page Git Product logo

Comments (2)

y2000zhang avatar y2000zhang commented on July 17, 2024

from proxypool.

Blackhatfrance avatar Blackhatfrance commented on July 17, 2024

Ty
Tried to modified Dockerbuild like that :

FROM python:3.7-alpine AS build
COPY requirements.txt /tmp/requirements.txt
RUN apk update &&
apk add --no-cache gcc bash g++ libffi-dev openssl-dev libxml2-dev libxslt-dev build-base musl-dev &&
pip install -U pip &&
pip install --timeout 30 --user --no-cache-dir --no-warn-script-location -r /tmp/requirements.txt -i https://pypi.douban.com/simple

FROM python:3.7-alpine
ENV APP_ENV=prod
ENV LOCAL_PKG="/root/.local"
COPY --from=build ${LOCAL_PKG} ${LOCAL_PKG}
ENV HEROKU_EXEC_DEBUG=1
RUN apk update && apk add --no-cache libffi-dev openssl-dev libxslt-dev &&
ln -sf ${LOCAL_PKG}/bin/* /usr/local/bin/

Set the working directory to /app

WORKDIR /app

Copy the current directory contents into the container at /app

COPY . /app

Expose port 3000 for accessing the app

EXPOSE 5555

This allows Heroku bind its PORT the Apps port

since Heroku needs to use its own PORT before the App can be made accessible to the World

EXPOSE $PORT
RUN adduser -D myuser
USER myuser
CMD chmod +x supervisord
ENTRYPOINT ["/bin/sh"]
CMD python run.py

Like i found on internet, no persistant folder, expose should be a variable and script dont allowed to run at root

from proxypool.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.