Files
qr-code_manager/gunicorn.conf.py
ske087 264a81652a Production deployment fixes and enhancements
- Added environment variable loading with python-dotenv
- Fixed Docker session permissions by using /tmp directory
- Updated .dockerignore to include .env file properly
- Enhanced docker-compose.yml with env_file directive
- Fixed Gunicorn configuration for Docker compatibility
- Updated README.md with comprehensive deployment docs
- Cleaned up debug logging from API routes
- Added DOMAIN_SETUP.md for reverse proxy guidance
- All production issues resolved and tested working
- Application now accessible at qr.moto-adv.com
2025-07-16 17:49:10 -04:00

39 lines
839 B
Python
Executable File

# Gunicorn configuration file
# Documentation: https://docs.gunicorn.org/en/stable/configure.html
# Server socket
bind = "0.0.0.0:5000"
backlog = 2048
# Worker processes
workers = 4
worker_class = "sync"
worker_connections = 1000
timeout = 30
keepalive = 2
# Restart workers after this many requests, to prevent memory leaks
max_requests = 1000
max_requests_jitter = 50
# Logging
accesslog = "-"
errorlog = "-"
loglevel = "info"
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'
# Process naming
proc_name = "qr-code-manager"
# Server mechanics
preload_app = True
pidfile = "/tmp/gunicorn.pid"
# Comment out user/group for Docker deployment
# user = "app"
# group = "app"
tmp_upload_dir = None
# SSL (uncomment and configure for HTTPS)
# keyfile = "/path/to/keyfile"
# certfile = "/path/to/certfile"