diff --git a/Dockerfile b/Dockerfile index ad61d714..6e35526c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.7 +FROM python:3.9-slim ENV PYTHONUNBUFFERED 1 WORKDIR /konova diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 3e405b72..e9f2cea2 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -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 \ No newline at end of file +# 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 \ No newline at end of file