Initial commit
This commit is contained in:
parent
b8bdc46525
commit
4cd9db36cd
10 changed files with 206 additions and 0 deletions
28
Dockerfile
Normal file
28
Dockerfile
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
FROM python:3.6-slim
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y libpq-dev python-dev gcc
|
||||
|
||||
## make a local directory
|
||||
RUN mkdir /app
|
||||
|
||||
# set "app" as the working directory from which CMD, RUN, ADD references
|
||||
WORKDIR /app
|
||||
|
||||
# copy requirements.txt to /app
|
||||
ADD requirements.txt .
|
||||
|
||||
# required to be able to install old MarkupSafe==1.0.0 version
|
||||
RUN pip install --upgrade pip setuptools==45.2.0
|
||||
|
||||
# pip install the local requirements.txt
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# now copy all the files in this directory to /code
|
||||
ADD . .
|
||||
|
||||
# Listen to port 80 at runtime
|
||||
EXPOSE 5000
|
||||
|
||||
# Define our command to be run when launching the container
|
||||
CMD ["gunicorn", "app:app", "-b", "0.0.0.0:5000", "--workers", "4", "--reload", "--capture-output", "--enable-stdio-inheritance", "--log-level", "DEBUG"]
|
||||
Reference in a new issue