diff --git a/supervisor.conf b/supervisor.conf index 70d7845..d7dedb6 100644 --- a/supervisor.conf +++ b/supervisor.conf @@ -1,16 +1,13 @@ [supervisord] nodaemon=true -user=django +# به جای مسیرهای سیستم، از /tmp استفاده کنید logfile=/dev/null -logfile_maxbytes=0 pidfile=/tmp/supervisord.pid -# ------------------------------------------------------------ -# پروسه وب‌سرور جنگو (Gunicorn) -# ------------------------------------------------------------ [program:django-web] -command=gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3 --timeout 120 +command=gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3 directory=/app +user=django autostart=true autorestart=true stdout_logfile=/dev/stdout @@ -18,19 +15,12 @@ stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 -# ------------------------------------------------------------ -# پروسه پردازش تسک‌های سلری (Celery Worker) -# ------------------------------------------------------------ [program:celery-worker] -process_name=%(program_name)s_%(process_num)02d command=celery -A config worker -l INFO directory=/app +user=django autostart=true autorestart=true -# مدیریت خروج امن تسک‌ها در زمان ری‌استارت یا دیپلوی در Coolify -stopasgroup=true -killasgroup=true -stopwaitsecs=600 stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr