deploy: make the build context overridable for Compose Manager - #2
Open
pequalsnp wants to merge 1 commit into
Open
deploy: make the build context overridable for Compose Manager#2pequalsnp wants to merge 1 commit into
pequalsnp wants to merge 1 commit into
Conversation
deploy/README.md documents an Unraid deployment, but the stack cannot
actually be deployed that way. Compose Manager does not run a stack from a
checkout — it requires the compose file to live in its own
projects/<name>/docker-compose.yml. The relative `context: ..` then
resolves to the projects directory rather than the repo root, so
`docker compose up -d` fails to build, and the failure gives no clue that
the build context is the problem.
Found the hard way on a box where refrain was already running: the image
existed from an earlier build, so nothing looked wrong until the image
cache was about to be wiped, at which point the stack would simply not
have come back.
`context: ${REFRAIN_SRC:-..}` keeps the documented `docker compose up -d
--build` from deploy/ working exactly as before — verified with
`docker compose config`, which still resolves the context to the repo
root when REFRAIN_SRC is unset — while letting a copied compose file
point at the real checkout. Same pattern the subkb stack already uses.
Also promotes the Unraid note in deploy/README.md to its own section with
the caveat spelled out, and documents REFRAIN_SRC in .env.example as the
opt-in it is.
Co-Authored-By: Claude Opus 5 <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.
deploy/README.mddocuments an Unraid deployment, but the stack can't actually be deployed that way.Compose Manager doesn't run a stack from a checkout — it requires the compose file to live in its own
projects/<name>/docker-compose.yml. The relativecontext: ..then resolves to the projects directory instead of the repo root, sodocker compose up -dfails to build, and the error gives no hint that the build context is the problem.How this surfaced
On a box where refrain was already running. The image existed from an earlier build, so nothing looked wrong — right up until that image cache was about to be wiped for unrelated maintenance, at which point the stack simply would not have come back. Caught during pre-flight rather than during the outage.
The change
docker compose up -d --buildfromdeploy/) → resolves to the repo root exactly as before. Verified withdocker compose config.Same pattern the subkb stack already uses for its own build context, so it should read as familiar rather than novel.
Plus: the Unraid note in
deploy/README.mdgets promoted to its own section with the caveat spelled out (including why the checkout shouldn't live in the compose project dir — Unraid's flash is FAT), andREFRAIN_SRCis documented in.env.exampleas the opt-in it is.No Go code touched.