diff --git a/Dockerfile b/Dockerfile index fc4650e..c6ba00a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,6 +63,9 @@ RUN pip install \ COPY requirements.txt . RUN python -m pip install -r requirements.txt +# Default amount of uWSGI processes +ENV UWSGI_WORKERS=2 + COPY app.py uwsgi.ini default-config.yml ./ COPY static static COPY nau nau diff --git a/uwsgi.ini b/uwsgi.ini index 9b5e9af..8bf56a5 100644 --- a/uwsgi.ini +++ b/uwsgi.ini @@ -4,7 +4,10 @@ http-socket = :5000 endif = master = true -processes = 5 +workers = 1 +if-env = UWSGI_WORKERS +workers = %(_) +endif = strict = true enable-threads = true