Valhalla container waits for maptool to install the freshly deployed service script
CI / check (push) Successful in 19s
CI / deploy (push) Successful in 22s

This commit is contained in:
randy committed 2026-11-14 12:16:22 +01:00
1 parent dbe1804ebf
commit ac7c7f3ba9
1 file changed
+6 -1
+6 -1
View File
@@ -141,7 +141,12 @@ services:
valhalla:
image: ghcr.io/valhalla/valhalla:3.9.1
restart: unless-stopped
command: ["bash", "-c", "until [ -f /data/routing/service.sh ]; do sleep 5; done; exec bash /data/routing/service.sh"]
depends_on:
- maptool
# maptool copies the deployed script here at boot. On a redeploy the
# old copy is still there, so wait (up to a minute) for a fresh one;
# a restart of this container alone runs the one that's there.
command: ["bash", "-c", "s=/data/routing/service.sh; t=$$(date +%s); until [ -f $$s ] && { [ $$(stat -c %Y $$s) -ge $$t ] || [ $$(($$(date +%s) - t)) -gt 60 ]; }; do sleep 2; done; exec bash $$s"]
volumes:
# :z, shared for the same reason as maptool's own ./data mount above.
- ./data:/data:z