-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.local.yml
125 lines (121 loc) · 3.07 KB
/
docker-compose.local.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
services:
webclient:
restart: unless-stopped
build: ./webclient
ports:
- "3000:3000"
environment:
NUXT_PUBLIC_MAPS_URL: http://tileserver:8080
NUXT_PUBLIC_CDN_URL: http://data:3002
NUXT_PUBLIC_API_URL: http://main-api:3003
depends_on:
tileserver:
condition: service_healthy
data:
condition: service_healthy
main-api:
condition: service_healthy
# maps
tileserver-init-config:
image: alpine:latest
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
- ./map/:/map/:ro
tileserver-srv-src: # needed for simpler initialisation of dev environments
image: nginx:1.27
restart: on-failure
volumes:
- tileserver-src:/usr/share/nginx/html/maps/vol:ro
depends_on:
tileserver-init-config:
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/
read_only: true
ports:
- "8080:8080"
depends_on:
tileserver-init-config:
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
meilisearch:
image: getmeili/meilisearch:v1.8.1
restart: unless-stopped
ports:
- "7700:7700"
healthcheck:
test: wget -q --spider http://localhost:7700/health
retries: 5
interval: 10s
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}
ports:
- "5432:5432"
healthcheck:
test: [ "CMD", "pg_isready", "-U", "${POSTGRES_USER}" ]
retries: 5
interval: 10s
start_period: 10s
volumes:
tileserver-src:
driver: local