dockerfile|

This commit is contained in:
javad committed 2026-06-20 18:17:43 +03:30
1 parent 0d0c2452c8
commit 8941fded53
5 files changed
+92 -1

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
#!/bin/sh
# متوقف کردن اسکریپت در صورت بروز هرگونه خطا در مراحل آماده‌سازی
set -e
echo "==> Collecting Static Files..."
# ۱. انتقال به ابتدای اسکریپت
python manage.py collectstatic --noinput --clear
echo "==> Running Database Migrations..."
# ۲. این دستور معمولاً باید بعد از استاتیک‌فایل‌ها یا در مرحله‌ای مجزا اجرا شود
python manage.py migrate --noinput
echo "==> Starting Gunicorn..."
exec gunicorn --bind 0.0.0.0:8000 myproject.wsgi:application