diff --git a/.gitea/workflows/ci-cd.yml b/.gitea/workflows/ci-cd.yml index e38c69a..b165ae0 100644 --- a/.gitea/workflows/ci-cd.yml +++ b/.gitea/workflows/ci-cd.yml @@ -310,16 +310,20 @@ jobs: DOCKER_BUILDKIT: 1 COMPOSE_DOCKER_CLI_BUILD: 1 - - name: Deploy main app services - # Only cycle the app containers — postgres and redis are long-running - # infrastructure that must never be restarted by CI. - # --force-recreate: always swap in the freshly-built images. - # --no-deps: do NOT pull in postgres/redis as dependencies. + - name: Stop old app containers + # The existing containers were created before compose labels were added, + # so Compose can't claim them and hits a name conflict on 'up'. + # This step removes only meezi's own 6 app containers — never touches + # postgres, redis, or any other project's containers. run: | - docker compose up -d \ - --no-deps \ - --force-recreate \ - api web website koja + for name in meezi-api meezi-web meezi-website meezi-koja meezi-admin-api meezi-admin-web; do + docker stop "$name" 2>/dev/null || true + docker rm "$name" 2>/dev/null || true + done + + - name: Deploy main app services + run: | + docker compose up -d --no-deps api web website koja - name: Deploy admin services run: | @@ -328,7 +332,6 @@ jobs: -f docker-compose.admin.yml \ up -d \ --no-deps \ - --force-recreate \ admin-api admin-web - name: Wait for main API healthy