fix models.py and add dockerfile

This commit is contained in:
javad committed 2026-06-22 13:05:23 +03:30
1 parent 333f990170
commit 2228279696
4 files changed
+173 -67

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 config.wsgi:application