
- Update Supervisor configuration to use python -m uvicorn for reliable module loading - Fix database path resolution using absolute paths - Add in-memory SQLite database option for testing and when file access is problematic - Improve error handling in database connection module - Enhance logging configuration with more detailed output - Add environment variables and documentation for better configuration options - Update troubleshooting guide with common issues and solutions
22 lines
596 B
Plaintext
22 lines
596 B
Plaintext
[supervisord]
|
|
nodaemon=true
|
|
logfile=/tmp/supervisord.log
|
|
logfile_maxbytes=50MB
|
|
logfile_backups=10
|
|
loglevel=info
|
|
pidfile=/tmp/supervisord.pid
|
|
|
|
[program:app-8001]
|
|
command=python -m uvicorn main:app --host 0.0.0.0 --port 8001 --log-level debug
|
|
directory=/projects/bloggingapi-a05jzl
|
|
autostart=true
|
|
autorestart=true
|
|
startretries=3
|
|
numprocs=1
|
|
startsecs=2
|
|
# Use either redirect_stderr or stderr_logfile, not both
|
|
redirect_stderr=true
|
|
stdout_logfile=/tmp/app-8001.log
|
|
stdout_logfile_maxbytes=50MB
|
|
stdout_logfile_backups=10
|
|
environment=PORT=8001,PYTHONUNBUFFERED=1,PYTHONPATH=/projects/bloggingapi-a05jzl |