chore(n): honor docker-compose.override.yml for the main dev stack#182
Draft
adekbadek wants to merge 1 commit into
Draft
chore(n): honor docker-compose.override.yml for the main dev stack#182adekbadek wants to merge 1 commit into
adekbadek wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Makes n start honor a developer-local docker-compose.override.yml for the main dev stack, restoring Compose's standard override behavior that was disabled by the explicit -f flag.
Changes:
- Append
-f docker-compose.override.ymlto thedocker compose upinvocation when the file exists. - Gitignore the override file so it stays per-developer.
- Document the override mechanism in
AGENTS.md.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| n | Conditionally adds the override file to the compose invocation in start(). |
| AGENTS.md | Documents how to customize the main dev stack via docker-compose.override.yml. |
| .gitignore | Ignores the new docker-compose.override.yml file. |
n start passes an explicit -f, which disables Compose's automatic loading of docker-compose.override.yml, so a developer's root override (e.g. extra bind mounts) was silently ignored. Append the override file to the invocation when it exists, leaving the default stack unchanged when absent. Isolated env containers keep their own override path. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
39348e9 to
dc4c6a6
Compare
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.
All Submissions:
Changes proposed in this Pull Request:
n startinvokes Docker Compose with an explicit-f docker-compose.yml, which disables Compose's automatic loading ofdocker-compose.override.yml. As a result, a developer's root override (e.g. extra bind mounts) was silently ignored.This makes
n startappend-f docker-compose.override.ymlto the Compose invocation only when that file exists, so its settings merge over the base stack. When the file is absent, the invocation is unchanged, so the default behavior is fully preserved.The override is scoped to the main dev stack (
newspack_dev). Isolated environments (n env) intentionally do not load it; they already layer their own generateddocker-compose.env-*.ymloverrides, and folding a global override into them could clobber env-specific config via file ordering. The override file is gitignored (it's a per-developer customization), and the mechanism is documented inAGENTS.md.Reported by Wil (Slack thread).
How to test the changes in this Pull Request:
cp .envinto place if needed (or run from your normal workspace with.envpresent).docker-compose.override.ymlat the workspace root that adds a bind mount to thewordpressservice:docker compose -f docker-compose.yml -f docker-compose.override.yml config(whatn startnow invokes) and confirm the merged output contains the/var/www/override-probemount. Equivalently, runn startand verify the mount is live:docker exec newspack_dev ls -la /var/www/override-probe.docker-compose.override.yml, runn startagain, and confirm the container comes up exactly as before (no probe mount) – default behavior is preserved when no override is present.n env up <name>still works and does not pick up the root override.Other information: