boot: stop stacks through compose at shutdown so just up orders the start #407
No reviewers
Labels
No labels
audit-work
bug
docs
general-admin
major-upgrade
needs-vps-sync
new-service
on-hold
outside-work
post-podman
renovate
upstream
vps
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
mysticalsoap/docker!407
Loading…
Reference in a new issue
No description provided.
Delete branch "boot/ordered-stop"
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?
Stacked on #406 (base is its branch); retarget to trunk once that merges.
Problem
docker-compose-boot.servicewas meant to apply the compose files'depends_onorder at boot, but dockerd replaysrestart: unless-stoppedfor every container first, in parallel. At today's boot the unit started four seconds after dockerd and found everything already running; Authelia had beaten LDAP up and been restarted by the policy. The Home-Server page claimed the unit solved this.Fix
just stop: composestopper stack in reverse order, containers kept.docker-compose-stop.service:RemainAfterExit,ExecStop=just stop, afterdocker.serviceso it runs before dockerd goes down. CLI-stopped containers are flagged manually stopped and the restart policy skips them at the next daemon start, sojust upis the only starter.PartOf=docker.serviceon both units:systemctl restart dockergoes through stop-then-up instead of leaving the stacks down.Interim until the Quadlet move.
Verification
Live, 2026-10-08:
systemd-analyze verifyon both units: clean.just stop dagu: four containers stopped in 11s, kept (docker ps -ashows them Exited);just up daguback to healthy in 6s.dagu,dagu-toolsanddagu-scannerexit 137, i.e. they sit out the 10s grace and get killed, same as at every shutdown today; not changed here.systemctl restart docker(full stop-then-up, ~2 min of downtime), then the next reboot's journal should showjust updoing the starting with no Authelia startup-check line.🤖 Generated with Claude Code