fix(docker): mount stubs at /work/mappings so they load#129
Merged
Conversation
The image loads stubs from <root-dir>/mappings, but the compose file and README mounted the host mappings dir at /work while passing --root-dir /work — so files in ./mappings landed at /work/*.json and were never read (the server looked in /work/mappings). Result: "no stubs, Docker doesn't work". Mount the host stub dir at /work/mappings instead (Docker run, compose, engine-only), point the local example at --root-dir . (loads ./mappings), and document that stubs live directly in ./mappings. Image itself is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- PowerShell has no `\` line-continuation (it becomes part of the image ref →
"invalid reference format"); add a single-line `${PWD}` example.
- Clarify that startup file-load populates the default tenant only; named tenants
load via the dashboard Import or /__admin/mappings/import with a tenant header.
Co-Authored-By: Claude Opus 4.8 <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.
Problem
People running via Docker saw no stubs load ("Docker doesn't work"). The image
loads stubs from
<root-dir>/mappings, but the compose file + README mounted the hostmappings folder at
/workwhile passing--root-dir /work. So./mappings/foo.jsonlanded at
/work/foo.json— but the server only reads/work/mappings/. Nothing loaded.Reproduced in a container: a stub at the mount root 404s; the same stub under
mount/mappings/serves 200.Fix (docs/config only — the image is unchanged)
docker run+docker-compose.yml+ engine-only example now mount the host stub dirat
/work/mappings(keeping--root-dir /work).--root-dir .so./mappings/*.jsonload consistently../mappings.Verified: with the corrected mount,
./mappings/hello.jsonloads and serves 200.🤖 Generated with Claude Code