diff --git a/.mokogitea/workflows/custom/deploy-dev.yml b/.mokogitea/workflows/custom/deploy-dev.yml index 106c882eb0..609227ee44 100644 --- a/.mokogitea/workflows/custom/deploy-dev.yml +++ b/.mokogitea/workflows/custom/deploy-dev.yml @@ -97,7 +97,14 @@ jobs: echo 'Restarting dev container...' cd /opt/gitea-dev sed -i "s|${{ env.IMAGE }}:[^ ]*|${{ env.IMAGE }}:$TAG|" docker-compose.yml - docker compose up -d mokogitea-dev + # The dev service uses a fixed container_name (mokogitea-dev). If a + # container with that name lingers under a different/none compose + # project (the symlinked /opt/gitea-dev path makes the derived project + # name unstable), `compose up` fails with a name conflict instead of + # recreating. Remove any such container first so the name is free, pin + # the project name for determinism, then force a fresh recreate. + docker rm -f mokogitea-dev 2>/dev/null || true + docker compose -p gitea-dev up -d --force-recreate mokogitea-dev echo 'Health check...' for i in 1 2 3 4 5 6 7 8; do