Stop coolify container last during upgrade

Reorder container stop sequence to stop dependencies first (db, redis,
realtime) before stopping the main coolify container. This prevents the
upgrade process from being interrupted when triggered from Coolify UI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Andras Bacsai
2025-12-12 15:36:01 +01:00
parent 7dc93001e3
commit f3ccacb2da
2 changed files with 4 additions and 2 deletions

View File

@@ -175,7 +175,8 @@ echo " All images pulled successfully."
log_section "Step 4/6: Stopping existing containers"
echo ""
echo "4/6 Stopping existing containers..."
for container in coolify coolify-db coolify-redis coolify-realtime; do
# Stop coolify last to allow upgrade process to complete gracefully
for container in coolify-db coolify-redis coolify-realtime coolify; do
if docker ps -a --format '{{.Names}}' | grep -q "^${container}$"; then
echo " - Stopping ${container}..."
log "Stopping container: ${container}"