-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose.yml
161 lines (159 loc) · 4.47 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
services:
webclient:
image: ghcr.io/tum-dev/navigatum-webclient:latest
restart: always
build: ./webclient
ports:
- "3000:3000"
environment:
TILESERVER_URL: http://tileserver:3001
CDN_URL: http://data:3002
MAIN_API_URL: http://main-api:3003
FEEDBACK_API_URL: http://feedback-api:3004
CALENDAR_API_URL: http://calendar-api:3005
depends_on:
tileserver:
condition: service_healthy
data:
condition: service_healthy
main-api:
condition: service_healthy
feedback-api:
condition: service_healthy
calendar-api:
condition: service_healthy
# maps
tileserver-init-sprites:
image: alpine:latest
restart: on-failure
command:
- 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]"
volumes:
- tileserver-sprites:/sprites
tileserver-init-src:
image: ubuntu:latest
restart: on-failure
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:
- ./map:/map
tileserver:
image: maptiler/tileserver-gl:latest
restart: always
command: /usr/src/app/docker-entrypoint.sh --public_url=https://nav.tum.de/maps/
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-sprites:/data/sprites:ro
- tileserver-fonts:/data/fonts:ro
- ./map/output.mbtiles:/data/output.mbtiles:ro
read_only: true
ports:
- "3001:8080"
depends_on:
tileserver-init-sprites:
condition: service_completed_successfully
tileserver-init-src:
condition: service_completed_successfully
# cdn
data:
image: ghcr.io/tum-dev/navigatum-cdn:latest
restart: always
build: ./data
ports:
- "3002:3002"
# server
main-api:
image: ghcr.io/tum-dev/navigatum-main-api:latest
restart: always
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
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: 30s
meilisearch:
image: getmeili/meilisearch:v1.5.0
restart: always
healthcheck:
test: wget -q --spider http://localhost:7700/health
retries: 5
interval: 10s
start_period: 10s
feedback-api:
image: ghcr.io/tum-dev/navigatum-server:latest
restart: always
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
calendar-api:
image: ghcr.io/tum-dev/navigatum-server:latest
restart: always
build: ./server
command: /bin/navigatum-calendar
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_URL: db:5432
depends_on:
db:
condition: service_healthy
ports:
- "3005:3005"
healthcheck:
test: wget -q --spider http://localhost:3005/api/calendar/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-sprites:
driver: local
tileserver-fonts:
driver: local
postgres-data:
driver: local