perf: reduce Gunicorn workers to 1 for stability
- Change from 4 workers to 1 worker in both Dockerfile and docker-compose.yml - Helps reduce resource usage and connection reset issues - Better for single-user or low-traffic deployment scenarios 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ RUN uv venv && \
|
||||
ENV FLASK_APP=main.py
|
||||
ENV FLASK_ENV=production
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
ENV GUNICORN_CMD_ARGS="--workers=4 --bind=0.0.0.0:5000 --timeout=120"
|
||||
ENV GUNICORN_CMD_ARGS="--workers=1 --bind=0.0.0.0:5000 --timeout=120"
|
||||
|
||||
# Expose port
|
||||
EXPOSE 5000
|
||||
|
||||
@@ -9,7 +9,7 @@ services:
|
||||
environment:
|
||||
- FLASK_APP=main.py
|
||||
- FLASK_ENV=production
|
||||
- GUNICORN_CMD_ARGS=--workers=4 --bind=0.0.0.0:5000 --timeout=120 --keep-alive=5 --worker-class=sync --worker-connections=1000 --max-requests=1000 --max-requests-jitter=50
|
||||
- GUNICORN_CMD_ARGS=--workers=1 --bind=0.0.0.0:5000 --timeout=120 --keep-alive=5 --worker-class=sync --worker-connections=1000 --max-requests=1000 --max-requests-jitter=50
|
||||
# Application configuration
|
||||
- UPLOAD_FOLDER=app/static/uploads
|
||||
- DATABASE_PATH=pet_pictures.db
|
||||
|
||||
Reference in New Issue
Block a user