1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-20 21:39:37 +02:00

Refresh world travel data each restart

This commit is contained in:
Sean Morley 2024-08-21 13:14:38 -04:00
parent f32a3393d9
commit 254844923b

View file

@ -16,9 +16,6 @@ done
# Apply Django migrations # Apply Django migrations
python manage.py migrate python manage.py migrate
# Check for default data
python manage.py worldtravel-seed
# Create superuser if environment variables are set and there are no users present at all. # Create superuser if environment variables are set and there are no users present at all.
if [ -n "$DJANGO_ADMIN_USERNAME" ] && [ -n "$DJANGO_ADMIN_PASSWORD" ]; then if [ -n "$DJANGO_ADMIN_USERNAME" ] && [ -n "$DJANGO_ADMIN_PASSWORD" ]; then
echo "Creating superuser..." echo "Creating superuser..."
@ -33,5 +30,8 @@ else:
EOF EOF
fi fi
# Sync the countries and world travel regions
python manage.py worldtravel-seed --force
# Start Django server # Start Django server
python manage.py runserver 0.0.0.0:8000 python manage.py runserver 0.0.0.0:8000