cfone/Dockerfile
2021-11-07 13:51:53 -05:00

19 lines
392 B
Docker

FROM python:3.9
ENV FLASK_APP run.py
COPY run.py gunicorn-cfg.py requirements.txt config.py .env ./
COPY app app
# 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
EXPOSE 5005
# gunicorn
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "run:app"]