Tweak the Dockerfile

This commit is contained in:
Thomas Sileo 2018-09-01 11:23:19 +02:00
parent 269c5135c2
commit f6586eb852
2 changed files with 4 additions and 2 deletions

View file

@ -3,5 +3,4 @@ ADD . /app
WORKDIR /app WORKDIR /app
RUN pip install -r requirements.txt RUN pip install -r requirements.txt
ENV FLASK_APP=app.py ENV FLASK_APP=app.py
RUN python -c "import config; config.create_indexes()" CMD ["./run.sh"]
CMD ["gunicorn", "-t", "300", "-w", "2", "-b", "0.0.0.0:5005", "--log-level", "debug", "app:app"]

3
run.sh Executable file
View file

@ -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