From c8975b6f6d40c5a819aba3deddb16a3df3c44845 Mon Sep 17 00:00:00 2001 From: Developer Date: Tue, 28 Jul 2026 07:13:00 +0700 Subject: [PATCH] fix: force remove conflicting containers before docker compose up docker compose down doesn't always remove containers that were created with a different compose configuration. Add explicit docker rm -f for all three containers before up. Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index d23ede6..0bd8387 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -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 down --remove-orphans && 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 rm -f imphenbot-discord-gateway imphenbot-backend imphenbot-proxy 2>/dev/null; docker compose up -d --remove-orphans && docker image prune -f"