You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
446 B
Docker

FROM python:3.9
RUN useradd -m -g nogroup server
USER server
WORKDIR /home/server
ENV FLASK_APP=main.py
# Perform the install of requirements first to avoid re-installing on every code change
COPY requirements.txt /home/server/
RUN pip install -r /home/server/requirements.txt
COPY *.py /home/server/
# CMD ["python", "/home/server/main.py"]
CMD ["/home/server/.local/bin/gunicorn", "--config", "/home/server/gunicorn.conf.py", "main:app"]