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