photon-docker/entrypoint.sh
Thomas Nordquist 1bf8b18af9 Initial commit
2017-07-19 13:30:37 +02:00

16 lines
459 B
Bash
Executable File

#!/bin/bash
# Download elasticsearch index
if [ ! -d "/photon/photon_data/elasticsearch" ]; then
echo "Downloading search index"
wget -O - http://download1.graphhopper.com/public/photon-db-latest.tar.bz2 | bzip2 -cd | tar x
fi
# Start photon if elastic index exists
if [ -d "/photon/photon_data/elasticsearch" ]; then
echo "Start photon"
java -jar photon.jar $@
else
echo "Could not start photon, the search index could not be found"
fi