From e0cc38ecb532f392e568d1dfc1b47a1353e83b2c Mon Sep 17 00:00:00 2001 From: "Gan, Jimmy" Date: Sat, 4 Apr 2026 00:45:55 +0800 Subject: [PATCH] fix: properly recreate container on deploy Use 'docker compose down' then 'up' instead of --no-recreate to ensure the new image is used and avoid network connection errors. --- .gitea/workflows/deploy-dev.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deploy-dev.yml b/.gitea/workflows/deploy-dev.yml index 24bfc5a..4965658 100644 --- a/.gitea/workflows/deploy-dev.yml +++ b/.gitea/workflows/deploy-dev.yml @@ -64,7 +64,6 @@ jobs: - name: Deploy dev run: | export DOCKER_API_VERSION=1.43 - # Use --no-recreate to avoid network issues, just restart with new image - docker compose -f /nas-dashboard/docker-compose.dev.yml up -d --no-recreate --pull never || \ - # If container doesn't exist, create it + # Stop and remove old container, then create with new image + docker compose -f /nas-dashboard/docker-compose.dev.yml down || true docker compose -f /nas-dashboard/docker-compose.dev.yml up -d --pull never