fix(deploy): mount and sync backend/custom_models to prod#73
Closed
cafca wants to merge 1 commit into
Closed
Conversation
GraphHopper now loads its routing rules from `backend/custom_models/beebeebike.json` (added in #72), but neither the prod compose nor the CD sync step were updated to ship that directory: - compose.prod.yml didn't bind-mount custom_models, so the GH container couldn't see the file even when present on the host. - The CD `Sync runtime config` step only scp'd compose.prod.yml and graphhopper_config.yml, so the custom model never reached helena. Symptom in prod after merging #72: GH crash-looped with `/custom_models/beebeebike.json (No such file or directory)`. This was deployed manually to unblock; the change here is what the next CD run needs to keep prod consistent.
4 tasks
Owner
Author
|
Superseded by #75 — moves custom_models into a thin GH image so host-side bind mount + scp sync are no longer needed. |
cafca
added a commit
that referenced
this pull request
May 7, 2026
Replace the host-side bind mount of `backend/custom_models/` with a custom GH image that COPYs the dir at build time. CD builds and pushes `ghcr.io/cafca/beebeebike-graphhopper:latest` alongside the backend image; `compose.prod.yml` pulls it. Routing rules now ship atomically with `docker compose pull`, no scp dance, no separate sync path. CD also gains a post-deploy probe: if the freshly-started GH container logs `Profile 'X' does not match` (i.e. the new image carries different priority/speed/distance_influence rules from what the cached graph was baked against), CD wipes `data/osm/berlin/graphhopper` and reimports. Cache is preserved across normal backend-only deploys. Supersedes #73 — the host-side custom_models scp + bind mount approach becomes unnecessary once the file lives inside the image that reads it.
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.
Summary
After merging #72, prod GraphHopper crash-looped with:
Two missing pieces caused this:
compose.prod.ymlhad no bind mount for the custom models directory, so even when the file was present on disk, the GH container couldn't see it..github/workflows/cd.yml's "Sync runtime config" step only scp'dcompose.prod.ymlandbackend/graphhopper_config.yml;backend/custom_models/*never reached helena.This PR fixes both so the next CD run keeps prod consistent. Already deployed manually to unblock; this just codifies the fix.
Notes
Test plan
backend/custom_models/*and prod GH stays healthy through the deploy.