Skip to content

fix(docker): mount stubs at /work/mappings so they load#129

Merged
omercelikdev merged 2 commits into
mainfrom
fix/docker-mappings-mount
Jul 9, 2026
Merged

fix(docker): mount stubs at /work/mappings so they load#129
omercelikdev merged 2 commits into
mainfrom
fix/docker-mappings-mount

Conversation

@omercelikdev

Copy link
Copy Markdown
Owner

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 host
mappings folder at /work while passing --root-dir /work. So ./mappings/foo.json
landed 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 dir
    at /work/mappings (keeping --root-dir /work).
  • Local example uses --root-dir . so ./mappings/*.json load consistently.
  • README note + Dockerfile comment clarify that stubs live directly in ./mappings.

Verified: with the corrected mount, ./mappings/hello.json loads and serves 200.

🤖 Generated with Claude Code

omercelikdev and others added 2 commits July 9, 2026 15:15
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>
@omercelikdev omercelikdev merged commit 1a893c9 into main Jul 9, 2026
7 of 9 checks passed
@omercelikdev omercelikdev deleted the fix/docker-mappings-mount branch July 9, 2026 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant