cfone/Dockerfile

19 lines
392 B
Docker
Raw Permalink Normal View History

2021-11-07 18:51:53 +00:00
FROM python:3.9
2021-09-23 03:46:35 +00:00
ENV FLASK_APP run.py
COPY run.py gunicorn-cfg.py requirements.txt config.py .env ./
COPY app app
2021-11-07 18:51:53 +00:00
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# install python dependencies
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
2021-09-23 03:46:35 +00:00
EXPOSE 5005
2021-11-07 18:51:53 +00:00
# gunicorn
2021-09-23 03:46:35 +00:00
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]