separate osmtile import and run

This commit is contained in:
deflax 2024-04-22 16:26:00 +03:00
parent c3478b8fc0
commit 220e152bd7
2 changed files with 42 additions and 19 deletions

View file

@ -1,5 +1,14 @@
1. Rename *dist.env* to *.env*. Update the environment variables.
2. run osmtile with import script
```sh
$ docker run \
-e UPDATES=enabled \
-e DOWNLOAD_PBF=https://download.geofabrik.de/europe/bulgaria-latest.osm.pbf \
-e DOWNLOAD_POLY=https://download.geofabrik.de/europe/bulgaria.poly \
-v "/root/forest-net/data/osmtile/pgdata:/data/database/" \
overv/openstreetmap-tile-server \
import
```
3. Build the images and run the containers:
```sh

View file

@ -7,9 +7,11 @@ services:
- "./data/db/pgdata:/var/lib/postgresql/data/"
env_file:
- ./variables.env
restart: always
restart: unless-stopped
networks:
- internal
labels:
- meta.role=db
pgadmin:
depends_on:
@ -22,9 +24,11 @@ services:
user: '$UID:$GID'
ports:
- 5050:80
restart: always
restart: unless-stopped
networks:
- internal
labels:
- meta.role=pgadmin
forest:
depends_on:
@ -44,8 +48,6 @@ services:
- internal
labels:
- meta.role=forest
#profiles:
# - donotstart
rfront:
depends_on:
@ -64,22 +66,34 @@ services:
- NODE_ENV=development
- REACT_APP_BACKEND_SERVICE_URL=http://localhost:5000
- REACT_APP_WEBSOCKET_SERVICE_URL=http://localhost:5001
restart: unless-stopped
networks:
- internal
labels:
- meta.role=rfront
profiles:
- donotstart
# osmtile:
# image: overv/openstreetmap-tile-server:2.3.0
# hostname: osmtile
# environment:
# - "DOWNLOAD_PBF=https://download.geofabrik.de/europe/bulgaria-latest.osm.pbf"
# - "DOWNLOAD_POLY=https://download.geofabrik.de/europe/bulgaria.poly"
# volumes:
# - "./data/osmtile/pgdata:/data/database/"
# command: "run"
# #command: "import"
# ports:
# - 80:8000
# networks:
# - internal
# restart: always
osmtile:
image: overv/openstreetmap-tile-server
volumes:
- "./data/osmtile/pgdata:/data/database/"
ports:
- "8000:80"
environment:
- REPLICATION_URL=https://planet.openstreetmap.org/replication/minute/
- MAX_INTERVAL_SECONDS=60
- UPDATES=enabled
- EXPIRY_MINZOOM=13
- EXPIRY_TOUCHFROM=13
- EXPIRY_DELETEFROM=19
- EXPIRY_MAXZOOM=20
command: "run"
restart: unless-stopped
networks:
- internal
labels:
- meta.role=osmtile
networks:
internal: {}