fix: docker-compose.yml generated by init diverges from running stack — recreate breaks services #354
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#354
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Problem
The docker-compose.yml is generated by
disinto init(via lib/generators.sh). When init is re-run or the compose template changes, the generated compose can diverge from the running stack. Runningdocker compose up -d <service>then recreates containers with different settings, breaking the factory.Observed:
docker compose up -d edgerecreated Forgejo on a new network (disinto_default instead of disinto_disinto-net). The old Woodpecker and agents containers stayed on the old network. Forgejo came up with a different container name (disinto-forgejo vs disinto-forgejo-1). Services could no longer reach each other.Specific issues found:
Root cause
The compose file is treated as both a template (generated by init) and a runtime config (used by docker compose up/down). When the template changes, it creates a gap between what's running and what the compose file describes.
Proposed solution
The compose file should not be regenerated on re-run if it already exists.
disinto initline that generates compose should skip if the file exists (it already does this for some files: "already exists, skipping"). Verify this check works for docker-compose.yml.For image tag drift: the compose template should use the same tag as the running instance. Either pin the version in projects/*.toml or detect the running version.
Affected files
Acceptance criteria
disinto initre-run does not regenerate docker-compose.yml if it existsdocker compose up -d <service>does not recreate unrelated services