forked from thoughtworks/maeve-csms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-with-lb.yml
149 lines (142 loc) · 3.11 KB
/
docker-compose-with-lb.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
networks:
default:
name: maeve-csms
enable_ipv6: true
ipam:
config:
- subnet: 2001:db8:a::/64
gateway: 2001:db8:a::1
services:
mqtt:
image: eclipse-mosquitto:2
volumes:
- type: bind
source: ./config/mosquitto
target: /mosquitto/config
read_only: true
ports:
- "1883:1883"
- "9000:9000"
user: "10000:10000"
healthcheck:
test: ["CMD-SHELL", "timeout 5 mosquitto_sub -t '$$SYS/#' -C 1 | grep -v Error || exit 1"]
interval: 10s
timeout: 10s
retries: 3
lb:
image: envoyproxy/envoy:v1.26-latest
command: ["-c", "/config/envoy.yaml"]
volumes:
- type: bind
source: ./config/envoy
target: /config
read_only: true
depends_on:
manager:
condition: service_healthy
gateway:
condition: service_healthy
ports:
- "80:80"
- "443:443"
- "9410:9410"
- "9411:9411"
gateway:
build:
context: gateway
depends_on:
mqtt:
condition: service_healthy
manager:
condition: service_healthy
command:
- "serve"
- "--ws-addr"
- ":9310"
- "--wss-addr"
- ":9311"
- "--status-addr"
- ":9312"
- "--tls-server-cert"
- "/certificates/csms.pem"
- "--tls-server-key"
- "/certificates/csms.key"
- "--tls-trust-cert"
- "/certificates/trust.pem"
- "--mqtt-addr"
- "mqtt://mqtt:1883"
- "--manager-api-addr"
- "http://manager:9410"
expose:
- "9310"
- "9311"
- "9312"
volumes:
- type: bind
source: ./config/certificates
target: /certificates
read_only: true
healthcheck:
test: ["CMD", "/usr/bin/curl", "-s", "--fail", "http://localhost:9312/health"]
interval: 10s
timeout: 10s
retries: 3
user: "10000:10000"
manager:
build:
context: manager
depends_on:
mqtt:
condition: service_healthy
environment:
ENVIRONMENT: dev
FIRESTORE_EMULATOR_HOST: firestore:8080
command:
- "serve"
- "-c"
- "/config/config.toml"
volumes:
- type: bind
source: ./config/certificates
target: /certificates
read_only: true
- type: bind
source: ./config/manager
target: /config
read_only: true
expose:
- "9410"
- "9411"
healthcheck:
test: ["CMD", "/usr/bin/curl", "-s", "--fail", "http://localhost:9410/health"]
interval: 10s
timeout: 10s
retries: 3
user: "10000:10000"
firestore:
image: google/cloud-sdk
command:
- gcloud
- emulators
- firestore
- start
- --host-port=0.0.0.0:8080
ports:
- "8080:8080"
grafana:
image: grafana/grafana:7.5.7
profiles:
- perf
ports:
- 3000:3000
restart: unless-stopped
prometheus:
image: prom/prometheus:v2.45.1
profiles:
- perf
ports:
- "9090:9090"
volumes:
- ./prometheus:/etc/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'