Gunicorn-ised

This commit is contained in:
Paul Warren 2020-11-09 14:17:17 +11:00
parent c3e07f2e2e
commit 95304bbc39
3 changed files with 10 additions and 13 deletions

View File

@ -1,20 +1,13 @@
FROM debian:10.5 FROM debian:10
MAINTAINER Paul Warren <pwarren@pwarren.id.au> MAINTAINER Paul Warren <pwarren@pwarren.id.au>
run apt-get update -y RUN apt-get update -y && apt-get install -y python3-pip python3-dev
run apt-get install -y python3-pip python3-dev
copy ./requirements.txt /requirements.txt ADD . /app
WORKDIR / WORKDIR /app
run pip3 install -r requirements.txt RUN pip3 install -r requirements.txt
copy ./app /app
ENTRYPOINT ["python3"]
CMD ["app/app.py"]
ENTRYPOINT ["./gunicorn_start.sh"]

3
gunicorn_start.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
gunicorn --chdir app app:app -w 2 --threads 2 -b 0.0.0:5002

View File

@ -1,3 +1,4 @@
numpy==1.16.2 numpy==1.16.2
Flask==1.0.2 Flask==1.0.2
Pillow==6.2.0 Pillow==6.2.0
gunicorn==20.0.4