improve dockerfile and fix
This commit is contained in:
1 parent
521ee0224b
commit
79d165a5df
2 files changed
+16
-13
No files matched your search
+6
-4
@@ -3,12 +3,14 @@
|
||||
# متوقف کردن اسکریپت در صورت بروز هرگونه خطا در مراحل آمادهسازی
|
||||
set -e
|
||||
|
||||
echo "==> Collecting Static Files..."
|
||||
# ۱. انتقال به ابتدای اسکریپت
|
||||
python manage.py collectstatic --noinput --clear
|
||||
|
||||
echo "==> Running Database Migrations..."
|
||||
# ۲. این دستور معمولاً باید بعد از استاتیکفایلها یا در مرحلهای مجزا اجرا شود
|
||||
python manage.py migrate --noinput
|
||||
|
||||
echo "==> Collecting Static Files..."
|
||||
python manage.py collectstatic --noinput
|
||||
|
||||
echo "==> Starting Supervisor..."
|
||||
# اجرای سوپروایزر به عنوان پروسه اصلی (PID 1) کانتینر
|
||||
# اجرای سوپروایزر با آدرس دقیق کانفیگ به عنوان پروسه اصلی
|
||||
exec supervisord -c /etc/supervisor/supervisord.conf
|
||||
Reference in new issue
Block a user