fix(compose): keep galaxy.stack label on containers only
The previous commit stamped `galaxy.stack=<value>` on services, volumes, and networks. Putting it on volumes/networks changes their compose config-hash on every label revision, so `docker compose up` tries to recreate them — which on the long-lived dev environment either destroys the postgres data volume or deadlocks while trying to remove `galaxy-dev-internal` with containers still bound to it. Observed live: run #184 hung in compose recreate after the three stateful services were stopped, with no recovery. Containers alone are sufficient for the cleanup contract (we filter containers, not volumes or networks). Roll back the label on volumes and networks in both compose files and capture the rule in docs/ARCHITECTURE.md so the next contributor does not reintroduce it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -238,22 +238,23 @@ networks:
|
||||
name: galaxy-dev-internal
|
||||
driver: bridge
|
||||
internal: false
|
||||
labels:
|
||||
galaxy.stack: dev-deploy
|
||||
edge:
|
||||
name: ${GALAXY_EDGE_NETWORK:-edge}
|
||||
external: true
|
||||
|
||||
# Note: `galaxy.stack=dev-deploy` is intentionally stamped only on
|
||||
# services (containers). Stamping it on networks or named volumes
|
||||
# changes the compose config-hash for those resources, and on a
|
||||
# subsequent `compose up` compose tries to recreate them — for the
|
||||
# `galaxy-dev-postgres-data` volume that means destroying the
|
||||
# database, and for `galaxy-dev-internal` it can deadlock if any
|
||||
# container is still attached. Per-container labels are sufficient
|
||||
# for the CI/cleanup contract; we filter containers, not volumes or
|
||||
# networks.
|
||||
volumes:
|
||||
galaxy-dev-postgres-data:
|
||||
name: galaxy-dev-postgres-data
|
||||
labels:
|
||||
galaxy.stack: dev-deploy
|
||||
galaxy-dev-caddy-data:
|
||||
name: galaxy-dev-caddy-data
|
||||
labels:
|
||||
galaxy.stack: dev-deploy
|
||||
galaxy-dev-ui-dist:
|
||||
name: galaxy-dev-ui-dist
|
||||
labels:
|
||||
galaxy.stack: dev-deploy
|
||||
|
||||
Reference in New Issue
Block a user