Commit5bac517
fix(deploy): reattach app to Coolify network after every rebuild
fix(deploy): reattach app to Coolify network after every rebuild Root cause of repeated post-deploy outages: this box is a Coolify co-tenant whose public ingress (coolify-proxy / Traefik) reaches the app over the external "coolify" docker network. `docker compose up --build` recreates the gluecron container from docker-compose.standalone.yml, which does NOT declare that network — so every single deploy silently detached the app and 502'd the live site until someone ran `docker network connect coolify` by hand. auto-update.sh now reattaches idempotently right after the rebuild, guarded on the coolify network existing (harmless no-op on a dedicated VPS). The Traefik file route (/traefik/dynamic/gluecron.yaml in coolify-proxy) already persists across app rebuilds, so the network reattach is the only missing piece. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 file changed+16−05bac5173701e674dc3e81468f8254b365dd04540
1 changed file+16−0
Modifiedscripts/auto-update.sh+16−0View fileUnifiedSplit
@@ -23,6 +23,22 @@ git reset --hard "origin/$BRANCH" # untracked .env / backups are preserved
2323
2424$COMPOSE up -d --build
2525sleep 5
26
27# Co-tenant ingress reattach (Coolify boxes only).
28# `docker compose up --build` recreates the gluecron container, which DROPS
29# any network attachment not declared in docker-compose.standalone.yml. On
30# this box the public ingress is Coolify's Traefik ("coolify-proxy"), which
31# reaches the app over the external "coolify" network via the file route
32# /traefik/dynamic/gluecron.yaml in the coolify-proxy container. Without this
33# reattach, every deploy 502s the site until someone reconnects by hand.
34# Idempotent: a no-op if already attached; harmless no-op on a dedicated VPS
35# that has no "coolify" network (errors are swallowed).
36if docker network inspect coolify >/dev/null 2>&1; then
37 docker network connect coolify gluecron-gluecron-1 2>/dev/null \
38 && echo "$(date -Is) reattached gluecron to coolify network" \
39 || echo "$(date -Is) coolify network already attached (ok)"
40fi
41
2642$COMPOSE exec -T gluecron bun run db:migrate || true
2743docker image prune -f >/dev/null 2>&1 || true
2844
2945