-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
280 lines (272 loc) · 7.88 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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
version: "3.8"
services:
proxy:
image: traefik:latest
restart: always
labels:
- traefik.http.routers.api.rule=Host(`traefik.${BASE_DOMAIN}`)
- traefik.http.routers.api.entrypoints=http
- traefik.http.routers.api.service=api@internal
ports:
- 80:80
- 8000:8000
volumes:
- ./traefik.yml:/traefik.yml
- /var/run/docker.sock:/var/run/docker.sock
networks:
- proxy
health:
image: ghcr.io/slntopp/nocloud/health:latest
restart: always
labels:
- traefik.http.routers.health.rule=PathPrefix("/nocloud.health.")
- traefik.http.routers.health.entrypoints=grpc
- traefik.http.services.health.loadbalancer.server.port=8000
- traefik.http.services.health.loadbalancer.server.scheme=h2c
environment:
LOG_LEVEL: -1
PORT: 8000
SIGNING_KEY: "${SIGNING_KEY}"
PROBABLES: registry:8000,billing:8000,services-registry:8000,sp-registry:8000,settings:8000,dns-mgmt:8000,edge:8000
networks:
- proxy
- grpc-internal
web:
image: ghcr.io/slntopp/nocloud/apiserver-web:latest
restart: always
depends_on:
- proxy
labels:
- traefik.http.routers.web.rule=Host(`api.${BASE_DOMAIN}`)
- traefik.http.routers.web.entrypoints=http
- traefik.http.services.web.loadbalancer.server.port=8000
environment:
LOG_LEVEL: -1
WITH_BLOCK: "false"
APISERVER_HOST: "proxy:8000"
networks:
- proxy
registry:
image: ghcr.io/slntopp/nocloud/registry:latest
restart: always
labels:
- traefik.http.routers.registry.rule=PathPrefix("/nocloud.registry.")
- traefik.http.routers.registry.entrypoints=grpc
- traefik.http.services.registry.loadbalancer.server.port=8000
- traefik.http.services.registry.loadbalancer.server.scheme=h2c
environment:
LOG_LEVEL: -1
PORT: 8000
DB_HOST: db:8529
DB_CRED: "${DB_USER}:${DB_PASS}"
NOCLOUD_ROOT_PASSWORD: "${NOCLOUD_ROOT_PASS}"
SIGNING_KEY: "${SIGNING_KEY}"
SETTINGS_HOST: settings:8000
SERVICES_HOST: services-registry:8000
depends_on:
- db
networks:
- proxy
- arangodb
- grpc-internal
links:
- db
services-registry:
image: ghcr.io/slntopp/nocloud/services-registry:latest
restart: always
labels:
- traefik.http.routers.services.rule=PathPrefix("/nocloud.services.", "/nocloud.instances.")
- traefik.http.routers.services.entrypoints=grpc
- traefik.http.services.services.loadbalancer.server.port=8000
- traefik.http.services.services.loadbalancer.server.scheme=h2c
environment:
LOG_LEVEL: -1
PORT: 8000
SIGNING_KEY: "${SIGNING_KEY}"
DB_HOST: db:8529
DB_CRED: "${DB_USER}:${DB_PASS}"
SETTINGS_HOST: settings:8000
BILLING_HOST: billing:8000
DRIVERS: driver-ione:8080
RABBITMQ_CONN: amqp://${RABBITMQ_USER}:${RABBITMQ_PASS}@rabbitmq:5672/
depends_on:
- db
- billing
- driver-ione
networks:
- proxy
- arangodb
- grpc-internal
- mq
links:
- db
- billing
sp-registry:
image: ghcr.io/slntopp/nocloud/sp-registry:latest
restart: always
labels:
- traefik.http.routers.services_providers.rule=PathPrefix("/nocloud.services_providers.")
- traefik.http.routers.services_providers.entrypoints=grpc
- traefik.http.services.services_providers.loadbalancer.server.port=8000
- traefik.http.services.services_providers.loadbalancer.server.scheme=h2c
environment:
LOG_LEVEL: -1
PORT: 8000
SIGNING_KEY: "${SIGNING_KEY}"
DB_HOST: db:8529
DB_CRED: "${DB_USER}:${DB_PASS}"
SETTINGS_HOST: settings:8000
DRIVERS: driver-ione:8080
RABBITMQ_CONN: amqp://${RABBITMQ_USER}:${RABBITMQ_PASS}@rabbitmq:5672/
depends_on:
- db
- driver-ione
networks:
- proxy
- arangodb
- grpc-internal
- mq
links:
- db
edge:
image: ghcr.io/slntopp/nocloud/edge:latest
restart: always
labels:
- traefik.http.routers.edge.rule=PathPrefix("/nocloud.edge.")
- traefik.http.routers.edge.entrypoints=grpc
- traefik.http.services.edge.loadbalancer.server.port=8000
- traefik.http.services.edge.loadbalancer.server.scheme=h2c
environment:
LOG_LEVEL: -1
PORT: 8000
SIGNING_KEY: "${SIGNING_KEY}"
RABBITMQ_CONN: amqp://${RABBITMQ_USER}:${RABBITMQ_PASS}@rabbitmq:5672/
networks:
- proxy
- mq
links:
- db
dns-mgmt:
image: ghcr.io/slntopp/nocloud/dns-mgmt:latest
restart: always
labels:
- traefik.http.routers.dns.rule=PathPrefix("/nocloud.dns.")
- traefik.http.routers.dns.entrypoints=grpc
- traefik.http.services.dns.loadbalancer.server.port=8000
- traefik.http.services.dns.loadbalancer.server.scheme=h2c
networks:
- proxy
- grpc-internal
- redis
environment:
LOG_LEVEL: -1
PORT: 8000
SIGNING_KEY: "${SIGNING_KEY}"
REDIS_HOST: redis_settings:6379
settings:
image: ghcr.io/slntopp/nocloud/settings:latest
restart: always
labels:
- traefik.http.routers.settings.rule=PathPrefix("/nocloud.settings.")
- traefik.http.routers.settings.entrypoints=grpc
- traefik.http.services.settings.loadbalancer.server.port=8000
- traefik.http.services.settings.loadbalancer.server.scheme=h2c
depends_on:
- redis_settings
networks:
- proxy
- grpc-internal
- redis
environment:
LOG_LEVEL: -1
PORT: 8000
SIGNING_KEY: "${SIGNING_KEY}"
REDIS_HOST: redis_settings:6379
redis_settings:
image: redis
restart: always
command: redis-server --save 60 1
networks:
- redis
volumes:
- redis-settings-data:/data
billing:
image: ghcr.io/slntopp/nocloud/billing:latest
restart: always
labels:
- traefik.http.routers.billing.rule=PathPrefix("/nocloud.billing.")
- traefik.http.routers.billing.entrypoints=grpc
- traefik.http.services.billing.loadbalancer.server.port=8000
- traefik.http.services.billing.loadbalancer.server.scheme=h2c
depends_on:
- db
- settings
networks:
- proxy
- arangodb
- grpc-internal
- mq
environment:
LOG_LEVEL: -1
PORT: 8000
SIGNING_KEY: "${SIGNING_KEY}"
DB_HOST: db:8529
DB_CRED: "${DB_USER}:${DB_PASS}"
SETTINGS_HOST: settings:8000
REGISTRY_HOST: registry:8000
RABBITMQ_CONN: amqp://${RABBITMQ_USER}:${RABBITMQ_PASS}@rabbitmq:5672/
links:
- db
db:
image: arangodb/arangodb:latest
restart: always
labels:
- traefik.http.routers.db.rule=Host(`db.${BASE_DOMAIN}`)
- traefik.http.routers.db.entrypoints=http
- traefik.http.services.db.loadbalancer.server.port=8529
environment:
ARANGO_ROOT_PASSWORD: "${DB_PASS}"
volumes:
- data:/var/lib/arangodb3
networks:
- proxy
- arangodb
rabbitmq:
image: rabbitmq:3.9-management
labels:
- traefik.http.routers.rabbitmq.rule=Host(`rbmq.nocloud.local`)
- traefik.http.routers.rabbitmq.entrypoints=http
- traefik.http.services.rabbitmq.loadbalancer.server.port=15672
networks:
- mq
- proxy
environment:
RABBITMQ_DEFAULT_USER: "${RABBITMQ_USER}"
RABBITMQ_DEFAULT_PASS: "${RABBITMQ_PASS}"
driver-ione:
container_name: driver-ione
restart: always
image: ghcr.io/slntopp/nocloud-driver-ione:latest
networks:
- grpc-internal
- mq
- redis
environment:
DRIVER_TYPE_KEY: ione
SIGNING_KEY: "${SIGNING_KEY}"
RABBITMQ_CONN: amqp://${RABBITMQ_USER}:${RABBITMQ_PASS}@rabbitmq:5672/
LOG_LEVEL: -1
REDIS_HOST: redis_settings:6379
networks:
proxy:
driver: bridge
grpc-internal:
arangodb:
driver: bridge
redis:
driver: bridge
mq:
driver: bridge
volumes:
redis-settings-data:
data: