Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/deploy-int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
SSL_KEY=${{ vars.SSL_KEY }}
CONCURRENCY=${{ vars.CONCURRENCY }}
MAX_CACHE_SIZE=${{ vars.MAX_CACHE_SIZE }}
USE_ELEVATION=${{ vars.USE_ELEVATION }}
PBF_LOCAL_PATH=${{ vars.PBF_LOCAL_PATH }}
PBF_URL=${{ vars.PBF_URL }}
HTTP_PROXY=${{ vars.HTTP_PROXY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
SSL_KEY=${{ vars.SSL_KEY }}
CONCURRENCY=${{ vars.CONCURRENCY }}
MAX_CACHE_SIZE=${{ vars.MAX_CACHE_SIZE }}
USE_ELEVATION=${{ vars.USE_ELEVATION }}
PBF_LOCAL_PATH=${{ vars.PBF_LOCAL_PATH }}
PBF_URL=${{ vars.PBF_URL }}
HTTP_PROXY=${{ vars.HTTP_PROXY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
SSL_KEY=${{ vars.SSL_KEY }}
CONCURRENCY=${{ vars.CONCURRENCY }}
MAX_CACHE_SIZE=${{ vars.MAX_CACHE_SIZE }}
USE_ELEVATION=${{ vars.USE_ELEVATION }}
PBF_LOCAL_PATH=${{ vars.PBF_LOCAL_PATH }}
PBF_URL=${{ vars.PBF_URL }}
HTTP_PROXY=${{ vars.HTTP_PROXY }}
Expand Down
2 changes: 1 addition & 1 deletion conf/valhalla.conf
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ stdout_logfile=/app/tmp_data/logs/builder.log
stdout_logfile_maxbytes=10MB
# stdout_logfile=/proc/1/fd/1
# stdout_logfile_maxbytes=0
environment=NO_PROXY="%(ENV_NO_PROXY)s",PBF_LOCAL_PATH="%(ENV_PBF_LOCAL_PATH)s",PBF_URL="%(ENV_PBF_URL)s",HTTPS_PROXY="%(ENV_HTTPS_PROXY)s",HTTP_PROXY="%(ENV_HTTP_PROXY)s",MAX_CACHE_SIZE="%(ENV_MAX_CACHE_SIZE)s",CONCURRENCY="%(ENV_CONCURRENCY)s",DATA_DIR="/app/data",TMP_DATA_DIR="/app/tmp_data"
environment=NO_PROXY="%(ENV_NO_PROXY)s",USE_ELEVATION="%(ENV_USE_ELEVATION)s",PBF_LOCAL_PATH="%(ENV_PBF_LOCAL_PATH)s",PBF_URL="%(ENV_PBF_URL)s",HTTPS_PROXY="%(ENV_HTTPS_PROXY)s",HTTP_PROXY="%(ENV_HTTP_PROXY)s",MAX_CACHE_SIZE="%(ENV_MAX_CACHE_SIZE)s",CONCURRENCY="%(ENV_CONCURRENCY)s",DATA_DIR="/app/data",TMP_DATA_DIR="/app/tmp_data"
1 change: 1 addition & 0 deletions scripts/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ elif [ "${cmd}" == 'app' ]; then
CONF_FILE="/etc/supervisor/conf.d/valhalla.conf"
sed -i \
-e "s|%(ENV_MAX_CACHE_SIZE)s|${MAX_CACHE_SIZE}|g" \
-e "s|%(ENV_USE_ELEVATION)s|${USE_ELEVATION}|g" \
-e "s|%(ENV_PBF_LOCAL_PATH)s|${PBF_LOCAL_PATH}|g" \
-e "s|%(ENV_PBF_URL)s|${PBF_URL}|g" \
-e "s|%(ENV_CONCURRENCY)s|${CONCURRENCY}|g" \
Expand Down
23 changes: 14 additions & 9 deletions scripts/run_valhalla.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ log_message "INFO: CONCURRENCY set to $CONCURRENCY"
log_message "INFO: MAX_CACHE_SIZE set to $MAX_CACHE_SIZE"
log_message "INFO: PBF_LOCAL_PATH set to $PBF_LOCAL_PATH"
log_message "INFO: PBF_URL set to $PBF_URL"
log_message "INFO: USE_ELEVATION set to $USE_ELEVATION"

# watch the .lock file every 10 secs
wait_for_lock() {
Expand Down Expand Up @@ -145,15 +146,19 @@ while true; do

log_message "INFO: Building initial graph with $PBF..."
valhalla_build_tiles -c "${valhalla_config}" -s initialize -e build "$PBF" || exit 1

log_message "INFO: Downloading elevation to $ELEVATION_DIR..."
valhalla_build_elevation --from-tiles --decompress -c ${valhalla_config} -v || exit 1
# debugging with andorra only:
# valhalla_build_elevation --decompress -c ${valhalla_config} -v -b 1,42,2,43 || exit 1

log_message "INFO: Enhancing initial tiles with elevation..."
valhalla_build_tiles -c "${valhalla_config}" -s enhance -e cleanup "$PBF" || exit 1


if [ "$USE_ELEVATION" = "true" ]; then
log_message "INFO: Downloading elevation to $ELEVATION_DIR..."
valhalla_build_elevation --from-tiles --decompress -c ${valhalla_config} -v || exit 1
# debugging with andorra only:
# valhalla_build_elevation --decompress -c ${valhalla_config} -v -b 1,42,2,43 || exit 1

log_message "INFO: Enhancing initial tiles with elevation..."
valhalla_build_tiles -c "${valhalla_config}" -s enhance -e cleanup "$PBF" || exit 1
else
log_message "INFO: Skipping elevation enhancement."
fi

# reset config so the service won't load the graph
reset_config

Expand Down
Loading