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. 1. Rename *dist.env* to *.env*. Update the environment variables.
2. run osmtile with import script 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: 3. Build the images and run the containers:
```sh ```sh

View file

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