Docker enhancement

* optimizes image build dependency
* increases gunicorn default number of workers
This commit is contained in:
mpeltriaux 2022-04-26 10:09:58 +02:00
parent 80de57a087
commit 7027e0c02b
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
FROM python:3.7
FROM python:3.9-slim
ENV PYTHONUNBUFFERED 1
WORKDIR /konova

View File

@ -1,7 +1,7 @@
#!/bin/bash
# Start all needed services inside the container!
# Start all needed services once the container is fired up!
service nginx start
service redis-server start
celery -A konova worker --detach
gunicorn konova.wsgi:application --bind 0.0.0.0:8000
# Rule of thumb: (2*CPU)+1 as worker_num -> Use 5 as default (matches a dual core)
gunicorn --workers=5 konova.wsgi:application --bind=0.0.0.0:8000