From 069f5113b243085de2901813117a2e86e6bc757e Mon Sep 17 00:00:00 2001 From: javad Date: Mon, 15 Jun 2026 12:35:27 +0330 Subject: [PATCH] first commit --- supervisor.conf | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/supervisor.conf b/supervisor.conf index aab4fa7..70d7845 100644 --- a/supervisor.conf +++ b/supervisor.conf @@ -1,12 +1,37 @@ +[supervisord] +nodaemon=true +user=django +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 +directory=/app +autostart=true +autorestart=true +stdout_logfile=/dev/stdout +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 autostart=true autorestart=true +# مدیریت خروج امن تسک‌ها در زمان ری‌استارت یا دیپلوی در Coolify stopasgroup=true killasgroup=true -numprocs=1 -startsecs=10 stopwaitsecs=600 -redirect_stderr=true -stdout_logfile=/tmp/worker.log \ No newline at end of file +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +stderr_logfile=/dev/stderr +stderr_logfile_maxbytes=0 \ No newline at end of file