diff options
-rwxr-xr-x | docker-entrypoint.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 1cf95db..899df63 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,6 +1,15 @@ #!/bin/sh cd /app + +# Run migrations python manage.py migrate -python manage.py createsuperuser --noinput + +# Try to create a superuser, skip if email is already taken +echo "Attempting to create superuser..." +python manage.py createsuperuser --noinput || true + +# Collect static files python manage.py collectstatic --noinput + +# Start Gunicorn exec gunicorn --bind ':8080' --workers 3 ded.wsgi:application |