Skip to content

Commit

Permalink
feat: add UWSGI_WORKERS environment variable
Browse files Browse the repository at this point in the history
Allow to change the uwsgi workers/processes.
  • Loading branch information
igobranco committed Oct 24, 2024
1 parent 3393503 commit 9d60ffd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9d60ffd

Please sign in to comment.