28 lines
757 B
Bash
Executable File
28 lines
757 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
echo "📦 Starting Django deploy script..."
|
|
|
|
echo "🔧 Running migrations..."
|
|
django-admin migrate --noinput
|
|
|
|
echo "📁 Collecting static files..."
|
|
django-admin collectstatic --noinput
|
|
|
|
echo "📁 Manually copying static files..."
|
|
cp -v /app/static/* /var/www/static/
|
|
|
|
echo "📁 Manually copying template files..."
|
|
cp -rv /app/templates/ /var/www/templates/
|
|
|
|
echo "👁️ Creating superuser..."
|
|
if django-admin createsuperuser --noinput --email ${DJANGO_SUPERUSER_EMAIL} --username ${DJANGO_SUPERUSER_USERNAME}; then
|
|
echo "👁️ Superuser ${DJANGO_SUPERUSER_USERNAME} already created ..."
|
|
else
|
|
echo "👁️ Superuser ${DJANGO_SUPERUSER_USERNAME} created successfully ..."
|
|
fi
|
|
|
|
echo "🚀 Launching Flightslot..."
|
|
exec "$@"
|