Docker enhancement
* optimizes image build dependency * increases gunicorn default number of workers
This commit is contained in:
parent
80de57a087
commit
7027e0c02b
@ -1,4 +1,4 @@
|
||||
FROM python:3.7
|
||||
FROM python:3.9-slim
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
WORKDIR /konova
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user