fix deploy.sh stopping router during blue-green switch

docker compose --profile stop also stops non-profiled services (router,
litestream), causing 502. Now explicitly names only slot services to stop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-02-13 22:16:19 +01:00
parent 337816c6c1
commit 1e56087060

View File

@@ -33,7 +33,7 @@ $COMPOSE --profile "$TARGET" run --rm "${TARGET}-app" \
echo "==> Starting $TARGET (waiting for health check)..."
if ! $COMPOSE --profile "$TARGET" up -d --wait; then
echo "!!! Health check failed — rolling back"
$COMPOSE --profile "$TARGET" stop
$COMPOSE stop "${TARGET}-app" "${TARGET}-worker" "${TARGET}-scheduler"
exit 1
fi
@@ -67,7 +67,7 @@ $COMPOSE exec router nginx -s reload
if [ "$CURRENT" != "none" ]; then
echo "==> Stopping $CURRENT..."
$COMPOSE --profile "$CURRENT" stop
$COMPOSE stop "${CURRENT}-app" "${CURRENT}-worker" "${CURRENT}-scheduler"
fi
# ── Record live slot ────────────────────────────────────────