From ff99632c0a3ac04c05e364338d10320157c78f28 Mon Sep 17 00:00:00 2001 From: javad Date: Tue, 16 Jun 2026 12:15:08 +0330 Subject: [PATCH] fix supervirod --- supervisord.conf | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/supervisord.conf b/supervisord.conf index e4b9c0f..f6b89b7 100644 --- a/supervisord.conf +++ b/supervisord.conf @@ -2,12 +2,10 @@ nodaemon=true logfile=/dev/null pidfile=/tmp/supervisord.pid -# 🛠️ اصلاح ۱: تعریف دایرکتوری مجاز برای لاگ‌های داخلی سوپروایزر childlogdir=/tmp [unix_http_server] file=/tmp/supervisor.sock -# 🛠️ اصلاح ۲: افزایش سطح دسترسی سوکت برای کاربر مالک فرآیند chmod=0770 [rpcinterface:supervisor] @@ -17,9 +15,9 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface serverurl=unix:///tmp/supervisor.sock [program:django-web] -command=gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3 +# 🛠️ اصلاح اصلی: آدرس‌دهی مستقیم به gunicorn موجود در محیط مجازی (Virtual Environment) +command=/opt/venv/bin/gunicorn config.wsgi:application --bind 0.0.0.0:8000 --workers 3 directory=/app -# 🛠️ اصلاح ۳: مشخص کردن صریح کاربر اجراکننده user=django autostart=true autorestart=true @@ -29,9 +27,9 @@ stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0 [program:celery-worker] -command=celery -A config worker -l INFO +# برای محکم‌کاری، آدرس سلری را هم به فایل اصلی ونیو متصل می‌کنیم +command=/opt/venv/bin/celery -A config worker -l INFO directory=/app -# 🛠️ اصلاح ۳: مشخص کردن صریح کاربر اجراکننده user=django autostart=true autorestart=true