-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathimport.sh
More file actions
executable file
·27 lines (23 loc) · 784 Bytes
/
import.sh
File metadata and controls
executable file
·27 lines (23 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
set -eo pipefail
echo "Creating docker volumes"
docker volume create osm-data
docker volume create osm-tiles
docker volume create valhalla-data
docker volume create nominatim-data
echo "Importing data for tile server"
docker run \
-v $(pwd)/osm-pbf/region.osm.pbf:/data/region.osm.pbf \
-v osm-data:/data/database/ \
-v $(pwd)/import-postgresql.conf:/etc/postgresql/14/main/postgresql.custom.conf.tmpl \
-e THREADS=16 \
-e "OSM2PGSQL_EXTRA_ARGS=-C 16384" \
overv/openstreetmap-tile-server \
import
echo "Importing data for valhalla"
docker run \
-v $(pwd)/osm-pbf/region.osm.pbf:/data/region.osm.pbf \
-v $(pwd)/scripts:/scripts \
-v valhalla-data:/data/valhalla \
valhalla/valhalla:run-latest \
/scripts/import_data.sh