fix: add docker compose down before up to avoid container name conflict
Build & Deploy / build-and-push (backend) (push) Failing after 1m10s
Build & Deploy / build-and-push (proxy) (push) Failing after 1m35s
Build & Deploy / build-and-push (discord-gateway) (push) Successful in 4m55s

When fresh images are pulled, docker compose up -d can fail with
'container name already in use' if the old containers are still
running. Adding docker compose down before up ensures clean restart.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Developer
2026-07-27 22:17:46 +07:00
co-authored by Claude Opus 4.8
parent 8d0f505784
commit 995a704c52
+1 -1
View File
@@ -64,4 +64,4 @@ jobs:
ENV_B64=$(echo "$ENV_FILE" | base64 -w0)
ssh -o StrictHostKeyChecking=accept-new \
"$VPS_USER@$VPS_HOST" \
"cd /opt/imphenbot/infra/docker && echo '$ENV_B64' | base64 -d > .env && docker compose pull && docker compose up -d --remove-orphans && docker image prune -f"
"cd /opt/imphenbot/infra/docker && echo '$ENV_B64' | base64 -d > .env && docker compose pull && docker compose down --remove-orphans && docker compose up -d --remove-orphans && docker image prune -f"