From f6586eb8529107fbaa02b3f332919c6d58f2d5fc Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sat, 1 Sep 2018 11:23:19 +0200 Subject: [PATCH] Tweak the Dockerfile --- Dockerfile | 3 +-- run.sh | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100755 run.sh diff --git a/Dockerfile b/Dockerfile index e813f1c..5ce7e72 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,5 +3,4 @@ ADD . /app WORKDIR /app RUN pip install -r requirements.txt ENV FLASK_APP=app.py -RUN python -c "import config; config.create_indexes()" -CMD ["gunicorn", "-t", "300", "-w", "2", "-b", "0.0.0.0:5005", "--log-level", "debug", "app:app"] +CMD ["./run.sh"] diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..a29f5fc --- /dev/null +++ b/run.sh @@ -0,0 +1,3 @@ +#!/bin/bash +python -c "import config; config.create_indexes()" +gunicorn -t 300 -w 2 -b 0.0.0.0:5005 --log-level debug app:app