Skip to content

Commit

Permalink
tested a different configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Mar 9, 2024
1 parent 64aa854 commit c639ebd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,12 @@ Else you can follow the steps in the [data documentation](data/README.md).

If you want to work on the webclient only (and not server or data), you don't need to set up the server. You can instead either use the public API (see the [webclient documentation](webclient/README.md#Testing)) or use our ready-made docker images to run the server locally:

```bash
docker run -v tileserver-sprites:/sprites alpine:latest sh -c "mkdir -p /sprites/ && rm -f /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]"
```
> [!NOTE]
> Because we have a tileserver, running the following command is required once.
>
> ```bash
> docker run -v tileserver-src:/data ubuntu:latest sh -c "apt -qq update && apt -qq install wget -y && wget --progress=bar:force:noscroll --timestamping --directory-prefix=/map --compression=auto --continue --tries=5 https://nav.tum.de/maps/vol/output.mbtiles"
> ```
```bash
docker compose up --build
Expand Down
20 changes: 14 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,28 @@ services:
# maps
tileserver-init-sprites:
image: alpine:latest
restart: on-failure
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/"
volumes:
- tileserver-src:/data
- ./deployment/k3s/files/:/to_data/:ro
depends_on:
tileserver-init-sprites:
condition: service_completed_successfully
tileserver-srv-src: # needed for simpler initialisation of dev environments
image: nginx:1.25
restart: on-failure
labels:
- "traefik.http.routers.navigatum.rule=Host(`nav.tum.de`) && PathPrefix(`/maps/vol/`)"
command: sh -c "apt update && apt install wget -y && wget --timestamping --directory-prefix=/map --compression=auto --continue --tries=5 https://nav.tum.de/maps/vol/output.mbtiles"
volumes:
- tileserver-src:/usr/share/nginx/html/maps/vol:ro
depends_on:
tileserver-init-config:
condition: service_completed_successfully
tileserver-init-sprites:
condition: service_completed_successfully
tileserver:
Expand All @@ -50,14 +59,13 @@ services:
tmpfs:
- /tmp
volumes:
- ./deployment/k3s/files/osm-liberty.json:/data/styles/osm-liberty.json:ro
- ./deployment/k3s/files/config.json:/data/config.json:ro
- tileserver-src:/data/:ro
- ./map/output.mbtiles:/data/output.mbtiles:ro
read_only: true
ports:
- "3001:8080"
depends_on:
tileserver-init-config:
condition: service_completed_successfully
tileserver-init-sprites:
condition: service_completed_successfully
# cdn
Expand All @@ -71,7 +79,7 @@ services:
- "3002:3002"
# server
main-api:
image: ghcr.io/tum-dev/navigatum-main-api:main
image: ghcr.io/tum-dev/navigatum-server:main
restart: always
labels:
- "traefik.http.routers.navigatum.rule=Host(`nav.tum.de`) && PathPrefix(`/api/`)"
Expand Down

0 comments on commit c639ebd

Please sign in to comment.