Files
catops/cntmanage/docker/entrypoint.sh

28 lines
777 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 version ${VERSION} ..."
exec "$@"