From ec3f4c6d08698b6a2ec7833159835ed08185f371 Mon Sep 17 00:00:00 2001 From: David Trattnig <david.trattnig@o94.at> Date: Sat, 20 Jun 2020 21:42:02 +0200 Subject: [PATCH] Run gunicorn in Docker. --- Dockerfile | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b2f978..3045ce9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,18 @@ FROM python:3.7-alpine +# Initialize the project structure + RUN mkdir -p /srv -WORKDIR /srv +RUN mkdir -p /var/log/aura -COPY requirements.txt /srv +# Copy sources and install +COPY . /srv +WORKDIR /srv RUN pip3 install --no-cache-dir -r requirements.txt -COPY . /srv +# Start the API Server EXPOSE 8008 - -# ENTRYPOINT ["python"] - -# CMD ["-m", "src"] \ No newline at end of file +ENTRYPOINT ["gunicorn"] +CMD ["-c", "config/gunicorn.conf.py", "engine-api.py:app"] -- GitLab