-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathDockerfile
More file actions
19 lines (15 loc) · 727 Bytes
/
Dockerfile
File metadata and controls
19 lines (15 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#WSGI compliant docker image for fast flask web app performance
FROM tiangolo/meinheld-gunicorn-flask:python3.7
# Copy local code to the container image.
ENV APP_HOME /app
WORKDIR $APP_HOME
#copy current directory to target container directory
COPY ./dash_app/src .
#install packages/dependencies
RUN pip install --trusted-host pypi.python.org -r requirements.txt
# Run the web service on container startup. Here we use the gunicorn
# webserver, with one worker process and 8 threads.
# For environments with multiple CPU cores, increase the number of workers
# to be equal to the cores available.
# https://community.plot.ly/t/error-with-gunicorn/8247
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 app:app.server