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:
@@ -1,8 +1,8 @@
|
|||||||
FROM ubuntu:20.04
|
FROM ubuntu:20.04
|
||||||
WORKDIR /code
|
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
|
COPY requirements.txt requirements.txt
|
||||||
RUN pip3 install -r requirements.txt
|
RUN pip3 install -r requirements.txt
|
||||||
EXPOSE 5000
|
EXPOSE 443
|
||||||
COPY . .
|
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"]
|
||||||
|
|||||||
Reference in New Issue
Block a user