Harden container deployment lifecycle
deploy / deploy (push) Canceled after 0s

This commit is contained in:
Jens
2026-07-21 21:35:52 +02:00
parent a4eced8be5
commit 213bdb60a5
7 changed files with 62 additions and 9 deletions
+8 -2
View File
@@ -73,6 +73,14 @@ app_scheme="${APP_SCHEME:-http}"
app_hostnames="${APP_HOSTS:-$app_host}"
app_origin="${APP_ORIGINS:-}"
# De lokale healthcheck gebruikt 127.0.0.1. Houd die host en localhost altijd
# toegestaan, ook wanneer APP_HOSTS expliciet door de runner is ingesteld.
for required_host in 127.0.0.1 localhost; do
if [[ ",$app_hostnames," != *",$required_host,"* ]]; then
app_hostnames="${app_hostnames},${required_host}"
fi
done
if [[ -z "$app_origin" ]]; then
if [[ "$app_scheme" == "https" ]]; then
if [[ "$app_port" == "443" ]]; then
@@ -149,8 +157,6 @@ if [[ "${SKIP_HEALTHCHECK:-0}" != "1" ]]; then
done
fi
docker compose -f "$compose_file" exec -T web python manage.py collectstatic --noinput
cat <<"EOF"
Deploy klaargezet.
+6 -3
View File
@@ -3,10 +3,13 @@ set -eu
mkdir -p /app/media /app/logs /app/local
mkdir -p /tmp/celery
python manage.py migrate --noinput
if [ "${VACATURERADAR_AUTO_BOOTSTRAP:-0}" = "1" ]; then
python manage.py bootstrap_instance || true
if [ "${VACATURERADAR_RUN_MIGRATIONS:-1}" = "1" ]; then
python manage.py migrate --noinput
if [ "${VACATURERADAR_AUTO_BOOTSTRAP:-0}" = "1" ]; then
python manage.py bootstrap_instance || true
fi
fi
exec "$@"