diff --git a/Dockerfile b/Dockerfile index efaada0..ab199aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,20 +1,13 @@ -FROM debian:10.5 +FROM debian:10 MAINTAINER Paul Warren -run apt-get update -y -run apt-get install -y python3-pip python3-dev +RUN apt-get update -y && apt-get install -y python3-pip python3-dev -copy ./requirements.txt /requirements.txt +ADD . /app -WORKDIR / +WORKDIR /app -run pip3 install -r requirements.txt - - -copy ./app /app - -ENTRYPOINT ["python3"] - -CMD ["app/app.py"] +RUN pip3 install -r requirements.txt +ENTRYPOINT ["./gunicorn_start.sh"] diff --git a/gunicorn_start.sh b/gunicorn_start.sh new file mode 100755 index 0000000..8887661 --- /dev/null +++ b/gunicorn_start.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +gunicorn --chdir app app:app -w 2 --threads 2 -b 0.0.0:5002 diff --git a/requirements.txt b/requirements.txt index 04ef721..221759e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ numpy==1.16.2 Flask==1.0.2 Pillow==6.2.0 +gunicorn==20.0.4