this is needed to get gunicorn to run with the newer code cross-importation syntax and to have threading, workers and ssl

This commit is contained in:
2021-01-14 20:50:27 +11:00
parent e4ed563245
commit 27ad9b0d60

View File

@@ -1,8 +1,8 @@
FROM ubuntu:20.04
WORKDIR /code
RUN apt-get update && apt-get -y install python3-pip python3-psycopg2 libpq-dev
RUN apt-get update && apt-get -y install python3-pip python3-psycopg2 libpq-dev gunicorn
COPY requirements.txt requirements.txt
RUN pip3 install -r requirements.txt
EXPOSE 5000
EXPOSE 443
COPY . .
CMD ["python3", "/code/main.py"]
CMD ["gunicorn", "--bind=0.0.0.0:443", "--workers=2","--threads=2", "--certfile", "/etc/letsencrypt/live/book.depaoli.id.au/fullchain.pem", "--keyfile", "/etc/letsencrypt/live/book.depaoli.id.au/privkey.pem","main:app"]