-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yaml
305 lines (291 loc) · 8.26 KB
/
docker-compose.yaml
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
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
version: '3'
services:
traefik:
image: traefik:picodon
environment:
- TRAEFIK_PROVIDERS_DOCKER=true
- TRAEFIK_PROVIDERS_REDIS_ENDPOINTS=redis:6379
- TRAEFIK_PROVIDERS_REDIS_ROOTKEY=traefik
- TRAEFIK_PROVIDERS_REDIS_PASSWORD=${REDIS_PASSWORD}
- TRAEFIK_API_DASHBOARD=true
- TRAEFIK_PING_MANUALROUTING=true
- TRAEFIK_ENTRYPOINTS_HTTP_ADDRESS=:80
- TRAEFIK_ENTRYPOINTS_HTTP_FORWARDEDHEADERS_TRUSTEDIPS=127.0.0.1/32
- TRAEFIK_LOG_FORMAT=common
- TRAEFIK_LOG_LEVEL=DEBUG
networks:
- pylon
ports:
- 80:80
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- redis
redis:
image: redis:alpine
command: redis-server --appendonly yes --requirepass ${REDIS_PASSWORD}
networks:
- pylon
container_name: carrier-redis
rabbitmq:
image: rabbitmq:3.12-management
environment:
- RABBITMQ_DEFAULT_USER=${RABBIT_USER}
- RABBITMQ_DEFAULT_PASS=${RABBIT_PASSWORD}
- RABBITMQ_DEFAULT_VHOST=carrier
networks:
- pylon
ports:
- 15672:15672
- 5672:5672
volumes:
- ./config/rabbitmq/advanced.config:/etc/rabbitmq/advanced.config
depends_on:
- redis
container_name: carrier-rabbit
postgres:
image: postgres:15.1
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
restart: unless-stopped
ports:
- 5432:5432
container_name: carrier-postgres
volumes:
- ./config/extras/postgre_schemas.sh:/docker-entrypoint-initdb.d/postgre_schemas.sh
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_SCHEMAS=${POSTGRES_SCHEMA},${KEYCLOAK_DB_SCHEMA}
- POSTGRES_INITDB_ARGS=${POSTGRES_INITDB_ARGS}
networks:
- pylon
vault:
image: vault:1.13.2
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
restart: unless-stopped
environment:
- 'VAULT_LOCAL_CONFIG={"disable_mlock":true,"listener":{"tcp":{"address":"0.0.0.0:8200","tls_disable": 1}},"storage":{"postgresql":{"connection_url":"postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:${POSTGRES_PORT}/${POSTGRES_DB}?sslmode=disable"}},"ui":false}'
command: vault server -config=/vault/config/local.json
ports:
- 8200:8200
networks:
- pylon
depends_on:
- postgres
container_name: carrier-vault
minio:
image: minio/minio:latest
# image: minio/minio:RELEASE.2023-06-29T05-12-28Z
command: server /data
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
ports:
- 9000:9000
environment:
- MINIO_ACCESS_KEY=${MINIO_ACCESS_KEY}
- MINIO_SECRET_KEY=${MINIO_SECRET_KEY}
- MINIO_API_SELECT_PARQUET=on
networks:
- pylon
container_name: carrier-minio
influx:
image: influxdb:1.8
restart: unless-stopped
environment:
- INFLUXDB_META_DIR=$INFLUXDB_META_DIR
- INFLUXDB_DATA_DIR=$INFLUXDB_DATA_DIR
- INFLUXDB_DATA_WAL_DIR=$INFLUXDB_DATA_WAL_DIR
- INFLUXDB_HTTP_ENABLED=$INFLUXDB_HTTP_ENABLED
- INFLUXDB_DATA_MAX_SERIES_PER_DATABASE=$INFLUXDB_DATA_MAX_SERIES_PER_DATABASE
ports:
- 8086:8086
labels:
- 'traefik.enable=false'
networks:
- pylon
container_name: carrier-influx
interceptor:
platform: linux/amd64
image: getcarrier/interceptor:latest
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
depends_on:
- rabbitmq
restart: unless-stopped
container_name: carrier-interceptor
environment:
- CPU_CORES=$INTERCEPTOR_TASKS
- RABBIT_HOST=$RABBIT_HOST
- RABBIT_USER=$RABBIT_USER
- RABBIT_PASSWORD=$RABBIT_PASSWORD
- LOKI_HOST=$APP_HOST
- RAM_QUOTA=$RAM_QUOTA
- CPU_QUOTA=$CPU_QUOTA
- QUEUE_NAME=$RABBIT_QUEUE_NAME
- PYLON_URL=http://carrier-pylon:8080
networks:
- pylon
volumes:
- /var/run/docker.sock:/var/run/docker.sock
interceptor_internal:
platform: linux/amd64
image: getcarrier/interceptor:latest
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
depends_on:
- rabbitmq
restart: unless-stopped
container_name: carrier-interceptor_internal
environment:
- CPU_CORES=$INTERNAL_TASKS
- RABBIT_HOST=$RABBIT_HOST
- RABBIT_USER=$RABBIT_USER
- RABBIT_PASSWORD=$RABBIT_PASSWORD
- LOKI_HOST=$LOKI_HOST_INTERNAL
- QUEUE_NAME=$INTERNAL_QUEUE
networks:
- pylon
volumes:
- /var/run/docker.sock:/var/run/docker.sock
keycloak:
image: aspect13/keycloak:9.0.0
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
restart: unless-stopped
container_name: carrier-keycloak
depends_on:
- postgres
- traefik
volumes:
- ./config/keycloak/carrier.json:/tmp/carrier.json
- ./config/keycloak/admin.json:/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json:ro
- ./config/keycloak/themes/src/main/resources/theme:/opt/jboss/keycloak/themes
- ./config/keycloak/entrypoint.sh:/opt/jboss/startup-scripts/entrypoint.sh
- ./config/keycloak/disable_ssl.sh:/tmp/disable_ssl.sh
environment:
- DB_VENDOR=$DATABASE_VENDOR
- DB_ADDR=postgres
- DB_DATABASE=$POSTGRES_DB
- DB_SCHEMA=$KEYCLOAK_DB_SCHEMA
- DB_USER=$POSTGRES_USER
- DB_PASSWORD=$POSTGRES_PASSWORD
- KEYCLOAK_IMPORT=/tmp/carrier.json
- KU=$KEYCLOAK_USER
- KP=$KEYCLOAK_PASSWORD
- PROXY_ADDRESS_FORWARDING=$PROXY_ADDRESS_FORWARDING
networks:
- pylon
ports:
- 8081:8080
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.keycloak.rule=PathPrefix(`/auth`)'
- 'traefik.http.services.keycloak.loadbalancer.server.port=8080'
- 'carrier=keycloak'
loki:
image: grafana/loki:2.3.0
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
restart: unless-stopped
networks:
- pylon
ports:
- "3100:3100"
command: -config.file=/etc/loki/local-config.yaml -table-manager.retention-period=$RETENTION_PERIOD -table-manager.retention-deletes-enabled=$RETENTION_DELETES_ENABLE
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.loki.rule=PathPrefix(`/loki`)'
- 'traefik.http.services.loki.loadbalancer.server.port=3100'
- 'carrier=loki'
container_name: carrier-loki
pylon:
image: getcarrier/pylon:latest
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
restart: unless-stopped
container_name: carrier-pylon
# user: ${UID}
depends_on:
- postgres
- traefik
- loki
- minio
- redis
- vault
- rabbitmq
- keycloak
volumes:
- .:/data
env_file:
- .env
networks:
- pylon
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.pylon.rule=PathPrefix(`/`)'
- 'traefik.http.services.pylon.loadbalancer.server.port=8080'
- 'traefik.http.middlewares.pylon-auth.forwardauth.address=http://pylon_auth:8080/forward-auth/auth?target=rpc'
- 'traefik.http.middlewares.pylon-auth.forwardauth.authResponseHeaders=X-Auth-Type,X-Auth-ID,X-Auth-Reference'
- 'traefik.http.routers.pylon.middlewares=pylon-auth@docker'
- 'carrier=pylon'
pylon_auth:
image: getcarrier/pylon:latest
logging:
driver: "json-file"
options:
max-file: "5"
max-size: "10m"
restart: unless-stopped
container_name: carrier-pylon-auth
# user: ${UID}
depends_on:
- postgres
- traefik
- loki
- minio
- redis
- vault
- rabbitmq
- keycloak
volumes:
- .:/data
env_file:
- .env
environment:
- CORE_CONFIG_SEED=file:/data/config/pylon_auth.yml
networks:
- pylon
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.pylon-auth.rule=PathPrefix(`/forward-auth`)'
- 'traefik.http.services.pylon-auth.loadbalancer.server.port=8080'
- 'carrier=pylon-auth'
networks:
pylon: