Valhalla container waits for maptool to install the freshly deployed service script
This commit is contained in:
1 parent
dbe1804ebf
commit
ac7c7f3ba9
1 file changed
+6
-1
+6
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user