Some checks failed
CI/CD Pipeline / Run Tests (push) Failing after 45s
CI/CD Pipeline / Code Quality Checks (push) Failing after 48s
CI/CD Pipeline / Build Docker Images (push) Has been skipped
CI/CD Pipeline / Push to Gitea Registry (push) Has been skipped
CI/CD Pipeline / Deploy to Server (push) Has been skipped
21 lines
458 B
Bash
Executable File
21 lines
458 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
export DJANGO_SETTINGS_MODULE="${DJANGO_SETTINGS_MODULE:-settings.dev}"
|
|
export STARTUP_COMPONENT="migrate"
|
|
|
|
case "${DJANGO_SETTINGS_MODULE}" in
|
|
settings.dev|settings.production|settings.test)
|
|
;;
|
|
esac
|
|
|
|
/app/docker/scripts/check-deps.sh
|
|
|
|
python src/manage.py migrate --noinput
|
|
|
|
if [ "${COLLECTSTATIC_ON_MIGRATE:-0}" = "1" ]; then
|
|
python src/manage.py collectstatic --noinput
|
|
fi
|
|
|
|
echo "[startup:migrate] migrations completed"
|