Reorganize devcontainer compose into colocated per-stack folders#8
Merged
Merged
Conversation
Replace the flat .devcontainer/compose/ directory (with config split off
into a parallel .devcontainer/config/ tree) with a single stacks/ folder
where each service owns its whole footprint: its compose.yaml plus any
config files, colocated in one place.
compose/postgres.yaml -> stacks/postgres/compose.yaml
config/postgres/* -> stacks/postgres/init/
compose/observability.yaml -> stacks/observability/compose.yaml
config/observability/* -> stacks/observability/config/
compose/{redis,minio,registry,azimutt}.yaml -> stacks/<name>/compose.yaml
Colocation makes each stack self-describing and independently runnable,
and naming every fragment compose.yaml is a standard name that improves
Dependabot image detection. The services-vs-tooling distinction is carried
by Compose profiles (postgres always-on; the rest opt-in), not folders.
Bind mounts rewritten to stack-relative paths (./init, ./config/...).
The root compose.yaml orchestrator stays put so .env auto-discovery,
startup.sh, and the dc alias are unaffected.
Updated references: compose.yaml include list, validate.yaml CI grep path,
dependabot.yml scan dirs (/.devcontainer/stacks/**), and CONFIGURATION.md.
Verified: `docker compose config` resolves all includes and mounts into
stacks/; postgres recreated and confirmed serving init SQL from the new
./init mount; CI floating-tag grep still scans every fragment.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The devcontainer's local services and tooling were split across two parallel trees — Compose fragments in
.devcontainer/compose/and their config files in.devcontainer/config/— so understanding one stack meant jumping between folders, andcompose/named the file type rather than what a developer is looking for.This restructures everything into a single
stacks/folder where each service owns its whole footprint (itscompose.yamlplus any config), colocated in one place:Why this shape (over a
services/vstooling/split): colocation makes each stack self-describing and independently runnable; a hard category split adds a fuzzy "which bucket?" tax on every addition, and the optional-vs-default signal it would carry is already expressed by Compose profiles (postgres is always-on; the rest are profile-gated). Naming every fragmentcompose.yamlis also a standard name that improves Dependabot image detection (the old non-standard names were flagged as friction independabot.yml).Changes
stacks/<name>/compose.yaml;config/postgres/*→stacks/postgres/init/;config/observability/*→stacks/observability/config/(all tracked by git as renames, content preserved)../init,./config/...).compose.yamlinclude list,validate.yamlCI grep path,dependabot.ymlscan dirs (/.devcontainer/stacks/**), andCONFIGURATION.md.compose.yaml, which didn't move):devcontainer.json,startup.sh, thedcalias,.envauto-discovery.config/shell/stays put — it's devcontainer shell setup, not a stack.Verification
docker compose -f .devcontainer/compose.yaml --profile observability configresolves all includes; every bind-mount source now resolves intostacks/…(confirmed none point at the old paths)../initmount; DB healthy, data preserved.stacks/path still reaches all 6 fragments and passes.🤖 Generated with Claude Code