Skip to content

Add --remove-orphans to the deploy step - #368

Merged
alexreinking merged 1 commit into
masterfrom
deploy-remove-orphans
Aug 5, 2026
Merged

Add --remove-orphans to the deploy step#368
alexreinking merged 1 commit into
masterfrom
deploy-remove-orphans

Conversation

@alexreinking

Copy link
Copy Markdown
Member

Summary

Adds --remove-orphans to the deploy script's docker compose up -d call.

Why

`docker compose up -d` alone only reconciles services still defined in docker-compose.yml -- it leaves containers running for services that were removed from the file untouched. This is exactly what happened with #367 (dropping the pypi/netmon services): both containers kept running unnoticed after that PR merged and deployed successfully, since the deploy step never actually told Docker to remove them. Only surfaced today when a VM reboot restarted them via their own restart: unless-stopped policy (netmon came back crash-looping, since its image/volumes are gone).

Cleaned up the currently-running orphans manually via docker compose up -d --remove-orphans on the host; this PR makes sure the deploy step does that automatically going forward for any future service removals.

Test plan

  • Manually ran docker compose up -d --remove-orphans on buildbot-master -- confirmed pypi and netmon containers stopped and removed, db/caddy/buildbot unaffected.

docker compose up -d alone leaves containers running for services that
were removed from docker-compose.yml -- it only affects services still
defined in the file. This is exactly what happened when #367 dropped
the pypi/netmon services: their containers kept running untouched
(netmon crash-looping) until a reboot surfaced it, at which point they
just came back via each container's own restart policy. --remove-orphans
makes 'docker compose up -d' actually reconcile to match the file.
@alexreinking
alexreinking merged commit 849be49 into master Aug 5, 2026
9 checks passed
@alexreinking
alexreinking deleted the deploy-remove-orphans branch August 5, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant