fix(ci): recreate dev container to avoid name conflict on deploy #740

Merged
jmiller merged 1 commits from fix/deploy-dev-container-conflict into dev 2026-07-05 15:19:01 +00:00
+8 -1
View File
@@ -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