-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored the tileserver initialisation to be less error prawn
- Loading branch information
1 parent
02740a6
commit d000169
Showing
11 changed files
with
3,464 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,23 +15,28 @@ services: | |
condition: service_healthy | ||
main-api: | ||
condition: service_healthy | ||
feedback-api: | ||
condition: service_healthy | ||
# maps | ||
tileserver-init-sprites: | ||
image: alpine:latest | ||
command: sh -c "mkdir -p /data/sprites/ && rm -f /data/sprites/* && wget -P /data/sprites ${TILE_SPRITES_URL}/osm-liberty.json ${TILE_SPRITES_URL}/[email protected] ${TILE_SPRITES_URL}/osm-liberty.png ${TILE_SPRITES_URL}/[email protected]" | ||
volumes: | ||
- tileserver-src:/data | ||
tileserver-init-config: | ||
image: alpine:latest | ||
command: sh -c "apk update --no-progress --quiet && apk add rsync --no-progress --quiet && rsync /to_data/ /data/" | ||
command: | ||
- /bin/sh | ||
- -c | ||
- | | ||
rm -f /data/*.json | ||
cp /map/*.json /data/ | ||
rm -fr /data/sprites/ | ||
mkdir -p /data/sprites/ | ||
cp /map/sprites/* /data/sprites/ | ||
rm -fr /data/styles/ | ||
mkdir -p /data/styles/ | ||
cp /map/styles/* /data/styles/ | ||
mkdir -p /data/fonts/ | ||
volumes: | ||
- tileserver-src:/data | ||
- ./deployment/k3s/files/:/to_data/:ro | ||
depends_on: | ||
tileserver-init-sprites: | ||
condition: service_completed_successfully | ||
- ./map/:/map/:ro | ||
tileserver-srv-src: # needed for simpler initialisation of dev environments | ||
image: nginx:1.26 | ||
restart: on-failure | ||
|
@@ -40,8 +45,6 @@ services: | |
depends_on: | ||
tileserver-init-config: | ||
condition: service_completed_successfully | ||
tileserver-init-sprites: | ||
condition: service_completed_successfully | ||
healthcheck: | ||
test: service nginx status || exit 1 | ||
retries: 2 | ||
|
@@ -61,8 +64,6 @@ services: | |
depends_on: | ||
tileserver-init-config: | ||
condition: service_completed_successfully | ||
tileserver-init-sprites: | ||
condition: service_completed_successfully | ||
# cdn | ||
data: | ||
restart: unless-stopped | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,20 +24,19 @@ services: | |
main-api: | ||
condition: service_healthy | ||
# maps | ||
tileserver-init-sprites: | ||
image: alpine:latest | ||
command: sh -c "mkdir -p /data/sprites/ && rm -f /data/sprites/* && wget -P /data/sprites ${TILE_SPRITES_URL}/osm-liberty.json ${TILE_SPRITES_URL}/[email protected] ${TILE_SPRITES_URL}/osm-liberty.png ${TILE_SPRITES_URL}/[email protected]" | ||
volumes: | ||
- tileserver-src:/data | ||
tileserver-init-config: | ||
image: alpine:latest | ||
command: sh -c "apk update --no-progress --quiet && apk add rsync --no-progress --quiet && rsync /to_data/ /data/" | ||
command: | ||
- /bin/bash | ||
- -c | ||
- | | ||
mkdir -p /data/sprites/ | ||
rm -f /data/*.json | ||
rm -f /data/style/* | ||
cp /map/sprites/* /data/sprites/ | ||
volumes: | ||
- tileserver-src:/data | ||
- ./deployment/k3s/files/:/to_data/:ro | ||
depends_on: | ||
tileserver-init-sprites: | ||
condition: service_completed_successfully | ||
- ./map/:/map/:ro | ||
tileserver-srv-src: # needed for simpler initialisation of dev environments | ||
image: nginx:1.26 | ||
restart: unless-stopped | ||
|
@@ -56,8 +55,6 @@ services: | |
depends_on: | ||
tileserver-init-config: | ||
condition: service_completed_successfully | ||
tileserver-init-sprites: | ||
condition: service_completed_successfully | ||
healthcheck: | ||
test: service nginx status || exit 1 | ||
retries: 2 | ||
|
@@ -89,8 +86,6 @@ services: | |
depends_on: | ||
tileserver-init-config: | ||
condition: service_completed_successfully | ||
tileserver-init-sprites: | ||
condition: service_completed_successfully | ||
# cdn | ||
data: | ||
image: ghcr.io/tum-dev/navigatum-data:main | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,7 +44,7 @@ This may be one optimisation point in the future. | |
From the root of the repository, run: | ||
|
||
```bash | ||
docker compose -f docker-compose.dev.yml up --build | ||
docker compose -f docker-compose.local.yml up --build | ||
``` | ||
|
||
### Edit the style | ||
|
@@ -80,3 +80,13 @@ docker run -it --rm -p 8888:8888 maputnik/editor | |
| Step 1 | Step 2 | | ||
|------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------| | ||
| ![Where in Maputnik to click to import a style](/resources/documentation/maputnik-import1.png) | ![Where in Maputnik to click then to import a style](/resources/documentation/maputnik-import2.png) | | ||
|
||
### Sprites | ||
|
||
We get our sprites from [maputnik/osm-liberty](https://github.com/maputnik/osm-liberty) via | ||
|
||
``` | ||
export TILE_SPRITES_URL=https://raw.githubusercontent.com/maputnik/osm-liberty/gh-pages/sprites | ||
rm sprites/* | ||
wget -P sprites ${TILE_SPRITES_URL}/osm-liberty.json ${TILE_SPRITES_URL}/[email protected] ${TILE_SPRITES_URL}/osm-liberty.png ${TILE_SPRITES_URL}/[email protected] | ||
``` |
File renamed without changes.
Oops, something went wrong.