-
-
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 development docker-compose.yml into a separate file
- Loading branch information
1 parent
369866b
commit 71da442
Showing
4 changed files
with
179 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
services: | ||
webclient: | ||
restart: unless-stopped | ||
build: ./webclient | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
TILESERVER_URL: http://tileserver:8080 | ||
CDN_URL: http://data:3002 | ||
MAIN_API_URL: http://main-api:3003 | ||
FEEDBACK_API_URL: http://feedback-api:3004 | ||
depends_on: | ||
tileserver: | ||
condition: service_healthy | ||
data: | ||
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/" | ||
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 | ||
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 | ||
healthcheck: | ||
test: service nginx status || exit 1 | ||
retries: 2 | ||
interval: 10s | ||
start_period: 10s | ||
tileserver: | ||
image: maptiler/tileserver-gl:latest | ||
restart: unless-stopped | ||
command: /usr/src/app/docker-entrypoint.sh --public_url=https://nav.tum.de/maps/ | ||
tmpfs: | ||
- /tmp | ||
volumes: | ||
- tileserver-src:/data/:ro | ||
read_only: true | ||
ports: | ||
- "8080:8080" | ||
depends_on: | ||
tileserver-init-config: | ||
condition: service_completed_successfully | ||
tileserver-init-sprites: | ||
condition: service_completed_successfully | ||
# cdn | ||
data: | ||
restart: unless-stopped | ||
build: ./data | ||
ports: | ||
- "3002:3002" | ||
# server | ||
main-api: | ||
restart: unless-stopped | ||
build: ./server | ||
command: /bin/navigatum-main-api | ||
ports: | ||
- "3003:3003" | ||
volumes: | ||
- type: tmpfs | ||
target: /home/navigatum/.cache | ||
user: 1000:3000 | ||
environment: | ||
MIELI_URL: http://meilisearch:7700 | ||
TILESERVER_URL: http://tileserver:8080 | ||
CDN_URL: http://data:3002/cdn | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||
POSTGRES_USER: ${POSTGRES_USER} | ||
POSTGRES_DB: ${POSTGRES_DB} | ||
POSTGRES_URL: db:5432 | ||
depends_on: | ||
meilisearch: | ||
condition: service_healthy | ||
db: | ||
condition: service_healthy | ||
healthcheck: | ||
test: wget -q --spider http://localhost:3003/api/status | ||
retries: 5 | ||
interval: 10s | ||
start_period: 60s | ||
meilisearch: | ||
image: getmeili/meilisearch:v1.7.1 | ||
restart: unless-stopped | ||
ports: | ||
- "7700:7700" | ||
healthcheck: | ||
test: wget -q --spider http://localhost:7700/health | ||
retries: 5 | ||
interval: 10s | ||
start_period: 10s | ||
feedback-api: | ||
restart: unless-stopped | ||
build: ./server | ||
command: /bin/navigatum-feedback | ||
ports: | ||
- "3004:3004" | ||
healthcheck: | ||
test: wget -q --spider http://localhost:3004/api/feedback/status | ||
retries: 5 | ||
start_period: 10s | ||
db: | ||
image: postgres:16 | ||
restart: unless-stopped | ||
environment: | ||
PGDATA: /var/lib/postgresql/data/pgdata | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} | ||
POSTGRES_USER: ${POSTGRES_USER} | ||
POSTGRES_DB: ${POSTGRES_DB} | ||
volumes: | ||
- postgres-data:/var/lib/postgresql/data | ||
ports: | ||
- "5432:5432" | ||
healthcheck: | ||
test: [ "CMD", "pg_isready", "-U", "${POSTGRES_USER}" ] | ||
retries: 5 | ||
interval: 10s | ||
start_period: 10s | ||
|
||
volumes: | ||
db-data: | ||
driver: local | ||
tileserver-src: | ||
driver: local | ||
postgres-data: | ||
driver: local |
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