From e5094b53ff4716db4c42ca15818fe210f218b1d2 Mon Sep 17 00:00:00 2001 From: "soroush.asadi" Date: Mon, 1 Jun 2026 08:17:11 +0330 Subject: [PATCH] Fix deploy: stop old container before starting new one Port 3000 was already allocated by the previous container from the Next.js era. --remove-orphans only removes containers within the same compose project, so the old one survived. Explicitly stop+rm the named container before docker compose up so the port is always free. Co-Authored-By: Claude Sonnet 4.6 --- .gitea/workflows/deploy.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index f940404..1531fd7 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -40,6 +40,11 @@ jobs: - name: Build Container run: docker compose build + - name: Stop Existing Container + run: | + docker stop soroushasadi-site 2>/dev/null || true + docker rm soroushasadi-site 2>/dev/null || true + - name: Deploy run: docker compose up -d --remove-orphans