Files
microservice/supervisor_celery.conf

55 lines
1.7 KiB
Plaintext

[program:efc_celery_worker]
command=/usr/local/bin/python -m celery -A celery_app worker --loglevel=info --pool=solo
directory=/app
user=fastapi
numprocs=1
stdout_logfile=/app/logs/celery_worker.log
stderr_logfile=/app/logs/celery_worker_error.log
stdout_logfile_maxbytes=50MB
stderr_logfile_maxbytes=50MB
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=600
killasgroup=true
priority=998
environment=REDIS_HOST="redis_microservice_dev",REDIS_PORT="6379",REDIS_DB="0",PYTHONPATH="/app:/home/fastapi/.local/lib/python3.11/site-packages",PATH="/home/fastapi/.local/bin:/usr/local/bin:%(ENV_PATH)s"
[program:efc_celery_beat]
command=/usr/local/bin/python -m celery -A celery_app beat --loglevel=info
directory=/app
user=fastapi
numprocs=1
stdout_logfile=/app/logs/celery_beat.log
stderr_logfile=/app/logs/celery_beat_error.log
stdout_logfile_maxbytes=50MB
stderr_logfile_maxbytes=50MB
autostart=false
autorestart=true
startsecs=10
stopwaitsecs=600
killasgroup=true
priority=999
environment=REDIS_HOST="redis_microservice_dev",REDIS_PORT="6379",REDIS_DB="0",PYTHONPATH="/app:/home/fastapi/.local/lib/python3.11/site-packages",PATH="/home/fastapi/.local/bin:/usr/local/bin:%(ENV_PATH)s"
[program:efc_fastapi]
command=/usr/local/bin/python -m uvicorn main:app --host 0.0.0.0 --port 8001 --workers 1
directory=/app
user=fastapi
numprocs=1
stdout_logfile=/app/logs/fastapi.log
stderr_logfile=/app/logs/fastapi_error.log
stdout_logfile_maxbytes=50MB
stderr_logfile_maxbytes=50MB
autostart=true
autorestart=true
startsecs=10
stopwaitsecs=600
killasgroup=true
priority=997
environment=PYTHONPATH="/app:/home/fastapi/.local/lib/python3.11/site-packages",PATH="/home/fastapi/.local/bin:/usr/local/bin:%(ENV_PATH)s"
[group:efc_services]
programs=efc_celery_worker,efc_fastapi
priority=999