Skip to content

Commit

Permalink
add common gunicorn start script, and worker count
Browse files Browse the repository at this point in the history
  • Loading branch information
gardenerik committed Sep 6, 2024
1 parent d526c1f commit 6ab6aba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ RUN chown appuser:appuser /app
ENV POETRY_VIRTUALENVS_CREATE=0
RUN pip install --upgrade poetry

ENV WEB_CONCURRENCY=4

COPY base /base
CMD ["/base/start.sh"]
3 changes: 3 additions & 0 deletions base/gunicorn.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

exec gunicorn --bind 127.0.0.1:8001 --access-logfile - --max-requests 2000 --max-requests-jitter 100 $1

0 comments on commit 6ab6aba

Please sign in to comment.