aswi2021jmsd-gitlab4/docker/gunicorn/Dockerfile @ e96150c4
1 |
FROM python:3.8.5-slim-buster |
---|---|
2 |
|
3 |
WORKDIR /usr/src/app |
4 |
|
5 |
# copy the whole application
|
6 |
COPY . . |
7 |
|
8 |
# upgrade pip, install gunicorn and app dependencies
|
9 |
RUN \ |
10 |
pip3 install --upgrade pip && \ |
11 |
pip3 install gunicorn && \ |
12 |
pip3 install --no-cache-dir -r requirements.txt |
13 |
|
14 |
# expose port 8000
|
15 |
# TODO could be loaded from env vars
|
16 |
EXPOSE 8000 |
17 |
|
18 |
# run the application via gunicorn WSGI
|
19 |
CMD ["gunicorn", "-c", "docker/gunicorn/config.py", "wsgi:flask_app"] |