-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.yml
238 lines (238 loc) · 6.71 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
version: "3.9"
volumes:
searchmeili:
networks:
backend:
frontend:
services:
traefik:
image: traefik:v2.3.2
ports:
- target: 80
published: 8880
mode: host
- target: 8080
published: 8881
mode: host
networks:
- frontend
- backend
command:
- --api.insecure=true
- --providers.docker=true
- --providers.docker.watch=true
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./_shared/traefik/certs:/certs
search:
image: fredmoser/meili:0.20.0-alpine
restart: on-failure
env_file: mapx.dev.env
ports:
- 7700
networks:
- backend
- frontend
volumes:
- searchmeili:/data.ms
labels:
traefik.enable: true
traefik.http.routers.search.rule: Host(`search.mapx.localhost`)
traefik.http.routers.search.entrypoints: web
traefik.http.services.search.loadbalancer.server.port: 7700
app:
image: fredmoser/mapx_app:1.13.11
restart: on-failure
depends_on:
- api
- pg
- traefik
env_file: mapx.dev.env
ports:
- 3838
networks:
- backend
- frontend
volumes:
- ./app:/app
- ./_shared:/shared
deploy:
mode: replicated
replicas: 2
labels:
traefik.enable: true
traefik.http.middlewares.cors.headers.accesscontrolallowmethods: GET
traefik.http.middlewares.cors.headers.accesscontrolalloworigin: "*"
traefik.http.middlewares.cors.headers.accesscontrolmaxage: 100
traefik.http.middlewares.cors.headers.addvaryheader: true
traefik.http.middlewares.nocache.headers.customresponseheaders.CACHE-CONTROL: no-cache
traefik.http.routers.app.rule: Host(`app.mapx.localhost`)
traefik.http.routers.app.entrypoints: web
traefik.http.routers.app.middlewares: cors,nocache
traefik.http.services.app.loadbalancer.server.port: 3838
app_dev:
image: fredmoser/mapx_app:1.13.11
restart: on-failure
depends_on:
- pg
- traefik
env_file: mapx.dev.env
environment:
API_HOST: api_dev
API_PORT: 3333
API_PORT_PUBLIC: 8880
API_HOST_PUBLIC: apidev.mapx.localhost
ports:
- 3434
networks:
- backend
- frontend
volumes:
- ./app:/app
- ./_shared:/shared
command: ["tail", "-f", "/dev/null"]
labels:
traefik.enable: true
traefik.http.middlewares.cors.headers.accesscontrolallowmethods: GET
traefik.http.middlewares.cors.headers.accesscontrolalloworigin: "*"
traefik.http.middlewares.cors.headers.accesscontrolmaxage: 100
traefik.http.middlewares.cors.headers.addvaryheader: true
traefik.http.middlewares.nocache.headers.customresponseheaders.CACHE-CONTROL: no-cache
traefik.http.routers.dev.rule: Host(`dev.mapx.localhost`)
traefik.http.routers.dev.entrypoints: web
traefik.http.routers.dev.middlewares: cors,nocache
traefik.http.services.dev.loadbalancer.server.port: 3434
api:
image: fredmoser/mapx_api:1.13.11
restart: on-failure
depends_on:
- pg
- redis
- traefik
env_file: mapx.dev.env
ports:
- 3030
networks:
- backend
- frontend
volumes:
- ./api:/api
- ./_shared:/shared
deploy:
mode: replicated
replicas: 2
labels:
traefik.enable: true
#traefik.http.middlewares.nocache.headers.customresponseheaders.CACHE-CONTROL: no-cache
traefik.http.middlewares.wcompress.compress: true
traefik.http.middlewares.wcompress.compress.excludedcontenttypes: text/plain
traefik.http.routers.api.rule: Host(`api.mapx.localhost`)
traefik.http.routers.api.entrypoints: web
traefik.http.routers.api.middlewares: wcompress,nocache
traefik.http.services.api.loadbalancer.server.port: 3030
api_dev:
image: fredmoser/mapx_api:1.13.11
restart: on-failure
depends_on:
- pg
- redis
- traefik
env_file: mapx.dev.env
environment:
API_HOST: api_dev
API_HOST_PUBLIC: apidev.mapx.localhost
ports:
- 3333
networks:
- backend
- frontend
volumes:
- ./api:/api
- ./_shared:/shared
command: ["tail", "-f", "/dev/null"]
labels:
traefik.enable: true
traefik.http.middlewares.nocache.headers.customresponseheaders.CACHE-CONTROL: no-cache
traefik.http.middlewares.wcompress.compress: true
traefik.http.middlewares.wcompress.compress.excludedcontenttypes: text/plain
traefik.http.routers.apidev.rule: Host(`apidev.mapx.localhost`)
traefik.http.routers.apidev.entrypoints: web
traefik.http.routers.apidev.middlewares: wcompress,nocache
traefik.http.services.apidev.loadbalancer.server.port: 3333
geoserver:
image: fredmoser/geoserver:2.20.4
restart: on-failure
env_file: mapx.dev.env
ports:
- 8882:8080
networks:
- backend
- frontend
volumes:
- ./_shared/geoserver:/geoserver/db
labels:
traefik.enable: true
traefik.http.routers.geoserver.rule: Host(`geoserver.mapx.localhost`)
traefik.http.routers.geoserver.entrypoints: web
traefik.http.services.geoserver.loadbalancer.server.port: 8080
deploy:
replicas: 1
pg:
image: ghcr.io/baosystems/postgis:13-3.3
restart: on-failure
env_file: mapx.dev.env
ports:
- 5432:5432
networks:
- backend
volumes:
- ./_shared:/shared
- ./pg/init/script_initdb.sh:/docker-entrypoint-initdb.d/script_initdb.sh
- ./pg/init/sql_files:/docker-entrypoint-initdb.d/sql_files
routines:
image: fredmoser/mapx_api:1.9.42
restart: on-failure
env_file: mapx.dev.env
networks:
- backend
depends_on:
- pg
- redis
- traefik
- search
volumes:
- ./api:/api
- ./_shared:/shared
command: ["node", "/api/routines.js"]
deploy:
replicas: 1
redis:
image: redis:6.2.6-alpine3.15
restart: on-failure
ports:
- 6379
networks:
- backend
volumes:
- ./redis.conf:/usr/local/etc/redis/redis.conf
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
mailhog:
image: mailhog/mailhog:v1.0.1
restart: on-failure
networks:
- frontend
- backend
logging:
driver: 'none'
entrypoint: ["/bin/sh", "-c", "MailHog > /dev/null 2>&1"]
command:
- --invite-jim=false
- --jim-reject-sender=0.5
- --jim-disconnect=0.8
labels:
traefik.enable: true
traefik.http.routers.mailhog.rule: Host(`mail.mapx.localhost`)
traefik.http.routers.mailhog.entrypoints: web
traefik.http.services.mailhog.loadbalancer.server.port: 8025