Erste lauffähige Version
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
ROLE="${ROLE:-web}"
|
||||
|
||||
if [[ "$ROLE" == "web" ]]; then
|
||||
echo "[entrypoint] waiting for database..."
|
||||
python manage.py wait_for_db --timeout 60 || true
|
||||
|
||||
echo "[entrypoint] running migrations..."
|
||||
python manage.py migrate --noinput
|
||||
|
||||
if [[ "${DJANGO_DEBUG:-False}" != "True" ]]; then
|
||||
echo "[entrypoint] collecting static files..."
|
||||
python manage.py collectstatic --noinput --clear
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "[entrypoint] starting role=$ROLE: $*"
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user