dockerfile|
This commit is contained in:
1 parent
0d0c2452c8
commit
8941fded53
5 files changed
+92
-1
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user