forked from Overv/openstreetmap-tile-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·40 lines (37 loc) · 826 Bytes
/
install.sh
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
27
28
29
30
31
32
33
34
35
36
37
38
39
PBF=$1
BOUNDING=$2
UPD=$3
DOWNLOAD_PBF="${PBF:-}"
PBF_BOUNDING="${BOUNDING:-}"
UPDATES="${UPD:-disabled}"
OSM_DATA=osm-data
DATA=$OSM_DATA:/data/database/
OSM_TILES=osm-tiles
TILES=$OSM_TILES:/data/tiles/
IMAGE=doclassif/osm-tile-server
echo "params" $DOWNLOAD_PBF $PBF_BOUNDING
if [ -f imported ]; then
docker run \
--name osm-tile-server \
-p 8070:80 \
-e UPDATES=$UPDATES \
-v $DATA \
-v $TILES \
-d $IMAGE \
run
else
bash remove.sh
docker volume create $OSM_DATA
docker volume create $OSM_TILES
docker run \
--name osm-tile-server-import \
-e DOWNLOAD_PBF=$DOWNLOAD_PBF \
-e PBF_BOUNDING="$PBF_BOUNDING" \
-v $DATA \
-v $TILES \
$IMAGE \
import &&
touch imported &&
docker rm osm-tile-server-import --force &&
bash install.sh
fi