Skip to content

Commit

Permalink
Migrate to docker #641 - Added some comments to the script.
Browse files Browse the repository at this point in the history
  • Loading branch information
HarelM committed Apr 19, 2020
1 parent 44b0bd2 commit 85a4382
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,3 @@ ModelManifest.xml
/IsraelHiking.Web/platforms
/IsraelHiking.Web/plugins
/IsraelHiking.Web/ul_web_hooks/android
/Graphhopper/data
2 changes: 1 addition & 1 deletion IsraelHiking.sln
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Scripts", "Scripts", "{3585
Scripts\BuildAndPublishIOS.ps1 = Scripts\BuildAndPublishIOS.ps1
Scripts\CleanLogs.cmd = Scripts\CleanLogs.cmd
Scripts\Deploy.ps1 = Scripts\Deploy.ps1
gh-update.cmd = gh-update.cmd
gh-update.ps1 = gh-update.ps1
Scripts\TestAndPublishWeb.ps1 = Scripts\TestAndPublishWeb.ps1
EndProjectSection
EndProject
Expand Down
4 changes: 0 additions & 4 deletions gh-update.cmd

This file was deleted.

9 changes: 9 additions & 0 deletions gh-update.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# The following line basically does all the magic using bash -c:
# 1. It run the container, imports graphhopper data to a temporay directory (new-gh)
# 2. Deleted the default cache (default-gh)
# 3. Moves the temporary cache to the default location.
docker-compose run --rm --entrypoint /bin/bash graphhopper -c "./graphhopper.sh import asia_israel-and-palestine.pbf -c /data/gh-config.yml -fd -o /data/new-gh/ && rm -rf /data/default-gh/ && mv /data/new-gh /data/default-gh"
# When everything is done, restarting the container will make it use the updated default cache.
docker-compose restart graphhopper

0 comments on commit 85a4382

Please sign in to comment.