fix(ci): recreate dev container to avoid name conflict on deploy #740
Reference in New Issue
Block a user
Delete Branch "fix/deploy-dev-container-conflict"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #737. With the tag-expansion bug fixed, the dev deploy now builds and pushes the image successfully but fails at the final step:
The dev service uses a fixed
container_name: mokogitea-dev, and the symlinked/opt/gitea-devpath makes compose's derived project name unstable (Using name "gitea-dev"from a symlink) — so the existing container isn't recognized as belonging to the project anddocker compose uptries to create rather than recreate, hitting the name conflict.Fix: remove any lingering fixed-name container first (
docker rm -f mokogitea-dev), pin the compose project name (-p gitea-dev), and force a fresh recreate (--force-recreate) so the new image comes up and migrations run.Once merged, the push to
devre-triggersdeploy-dev.yml; combined with #739 this should produce the first fully-green dev deploy (image builds → container recreated → migrations 362–366 apply → health check passes).YAML validated, no trailing whitespace.
https://claude.ai/code/session_01Wsno14cxE49MstXFs9G5KT