1 |
9832694f
|
Stanislav Král
|
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 |
cf4fc539
|
Stanislav Král
|
pip3 install --upgrade pip && \
|
11 |
|
|
pip3 install gunicorn && \
|
12 |
|
|
pip3 install --no-cache-dir -r requirements.txt
|
13 |
9832694f
|
Stanislav Král
|
|
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"]
|