-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
319 lines (315 loc) · 10.9 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
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
306
307
308
309
310
311
312
313
314
315
316
317
318
319
services:
# Service
service:
# Uncomment to use prebuilt srcs instead of image
build:
context: .
# image: decentboat/mail-service:latest
healthcheck:
test: "wget --no-verbose --tries=1 --spider localhost:8080/actuator/health/liveness || exit 1"
interval: 5s
timeout: 2s
retries: 5
start_period: 20s
depends_on:
- persistence-postgres.persistence
- monitoring-dataprepper.monitoring
- monitoring-collector.monitoring
- persistence-kafka.persistence
- persistence-keydb.persistence
- mailslurper
- mock-server
environment:
contour.cache.host: persistence-keydb.persistence
spring.application.name: mail-service
contour.cache.port: 6379
contour.mail.host: mailslurper
contour.mail.username: [email protected]
contour.mail.password: password
contour.mail.ssl-enabled: false
contour.mail.tls-enabled: false
contour.mail.tls-required: false
contour.mail.auth-enabled: false
contour.mail.port: 2500
contour.kafka.brokers: persistence-kafka.persistence:29092
contour.otlp.host: monitoring-collector.monitoring
contour.database.host: persistence-postgres.persistence
contour.database.port: 5432
contour.database.name: test
contour.database.schema: mail_service
contour.database.password: test
contour.database.user: test
ports:
- "8080:8080"
- "9091:9091"
- "9010:9010"
- "7001:7001"
# Storage
persistence-postgres.persistence:
image: postgres:16.3
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: test
POSTGRES_USER: test
POSTGRES_DB: test
command: postgres -c shared_preload_libraries='pg_stat_statements'
volumes:
- pg_data:/var/lib/postgresql/data
- ./config/db/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
ui-pgadmin.ui:
image: dpage/pgadmin4:2024-07-23-1
depends_on:
- persistence-postgres.persistence
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: 'False'
PGADMIN_SERVER_JSON_FILE: /pgadmin4/config/servers.json
volumes:
- ./config/db/pgadmin:/pgadmin4/config
- pgadmin:/var/lib/pgadmin
ports:
- "4002:80"
persistence-keydb.persistence:
image: eqalpha/keydb:alpine_x86_64_v6.3.4
restart: always
entrypoint: keydb-server --appendonly yes --requirepass 123 --maxmemory 512mb --maxmemory-policy allkeys-lru
ports:
- "6379:6379"
volumes:
- keydb_data:/data
# Kafka
persistence-zookeeper.persistence:
image: confluentinc/cp-zookeeper:7.6.2
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_SERVER_ID: 1
KAFKA_JMX_PORT: 9101
KAFKA_JMX_HOSTNAME: 0.0.0.0
KAFKA_OPTS: "-Dzookeeper.4lw.commands.whitelist=*"
volumes:
- zk-data:/var/lib/zookeeper/data
- zk-txn-logs:/var/lib/zookeeper/log
- zk-secrets:/etc/zookeeper/secrets
persistence-schema-registry.persistence:
image: confluentinc/cp-schema-registry:7.6.2
ports:
- "6005:6005"
depends_on:
- persistence-kafka.persistence
environment:
SCHEMA_REGISTRY_HOST_NAME: localhost
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:6005
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'persistence-kafka.persistence:29092'
volumes:
- schema-registry-secrets:/etc/schema-registry/secrets
persistence-kafka.persistence:
image: confluentinc/cp-kafka:7.6.2
depends_on:
- persistence-zookeeper.persistence
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: persistence-zookeeper.persistence:2181
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:29092,EXTERNAL://0.0.0.0:9092
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://persistence-kafka.persistence:29092,EXTERNAL://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 10
KAFKA_JMX_PORT: 9101
KAFKA_JMX_HOSTNAME: 0.0.0.0
KAFKA_JMX_OPTS: "-Dcom.sun.management.jmxremote.rmi.port=9101 -Djava.rmi.server.hostname=0.0.0.0 -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
volumes:
- kafka-data:/var/lib/kafka/data
- kafka-secrets:/etc/kafka/secrets
ui-kafka-ui.ui:
image: provectuslabs/kafka-ui:v0.7.2
ports:
- "9001:8080"
depends_on:
- persistence-zookeeper.persistence
- persistence-kafka.persistence
environment:
KAFKA_CLUSTERS_0_NAME: local
KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS: persistence-kafka.persistence:29092
KAFKA_CLUSTERS_0_ZOOKEEPER: persistence-zookeeper.persistence:2181
KAFKA_CLUSTERS_0_JMXPORT: 9997
# Observability
monitoring-prometheus.monitoring:
image: prom/prometheus
ports:
- "9090:9090"
volumes:
- ./config/observability/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/var/lib/prometheus
monitoring-collector.monitoring:
image: otel/opentelemetry-collector-contrib:0.105.0
volumes:
- ./config/observability/otelcollector/config.yaml:/etc/config.yaml
command: [ "--config=/etc/config.yaml" ]
ports:
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP http receiver
- "4319:4319" # OTLP http receiver
monitoring-dataprepper.monitoring:
image: opensearchproject/data-prepper:2.8.0
container_name: dataprepper
volumes:
- ./config/observability/dataprepper:/usr/share/data-prepper/pipelines
persistence-opensearch.persistence:
image: opensearchproject/opensearch:2.15.0
environment:
OPENSEARCH_INITIAL_ADMIN_PASSWORD: "Aa1@~sfhkjswfyj!"
discovery.type: "single-node"
DISABLE_SECURITY_PLUGIN: true
OPENSEARCH_JAVA_OPTS: "-Dopensearch.experimental.feature.telemetry.enabled=true"
volumes:
- opensearch_data:/usr/share/opensearch/data
ui-opensearch-dashboards.ui:
image: opensearchproject/opensearch-dashboards:2.15.0
depends_on:
- persistence-opensearch.persistence
ports:
- "5601:5601"
environment:
# must be a string with no spaces when specified as an environment variable
OPENSEARCH_HOSTS: '["http://persistence-opensearch.persistence:9200"]'
DISABLE_SECURITY_DASHBOARDS_PLUGIN: true
volumes:
- ./config/observability/dashboard/opensearch_dashboards.yml:/usr/share/opensearch-dashboards/config/opensearch_dashboards.yml
# Analytics
persistence-clickhouse.persistence:
image: clickhouse/clickhouse-server:24.5.3.5-alpine
ports:
- "8123:8123"
- "9000:9000"
environment:
CLICKHOUSE_DB: mail_service
CLICKHOUSE_USER: mail_service
CLICKHOUSE_PASSWORD: mail_service
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1
volumes:
- ch-data:/var/lib/clickhouse/
# - ./config/analytics/clickhouse/users.xml:/etc/clickhouse-server/users.d/users.xml
# - ./config/analytics/clickhouse/config.xml:/etc/clickhouse-server/config.d/config.xml
- ./config/analytics/clickhouse/init:/docker-entrypoint-initdb.d/
persistence-pgcompeng.persistence:
image: postgres:16-alpine
environment:
POSTGRES_PASSWORD: "pg-compeng"
POSTGRES_DB: pg-compeng
POSTGRES_USER: pg-compeng
persistence-pg-us.persistence:
image: postgres:16-alpine
environment:
POSTGRES_DB: us-db-ci_purgeable
POSTGRES_USER: us
POSTGRES_PASSWORD: us
ui-us.ui:
image: ghcr.io/datalens-tech/datalens-us:0.209.0
depends_on:
- persistence-pg-us.persistence
environment:
APP_INSTALLATION: "opensource"
APP_ENV: "prod"
MASTER_TOKEN: "fake-us-master-token"
POSTGRES_DSN_LIST: postgres://us:[email protected]:5432/us-db-ci_purgeable
SKIP_INSTALL_DB_EXTENSIONS: ${METADATA_SKIP_INSTALL_DB_EXTENSIONS:-0}
USE_DEMO_DATA: ${USE_DEMO_DATA:-1}
HC: ${HC:-0}
ui-control-api.ui:
image: ghcr.io/datalens-tech/datalens-control-api:0.2091.0
environment:
BI_API_UWSGI_WORKERS_COUNT: 4
CONNECTOR_AVAILABILITY_VISIBLE: "clickhouse"
RQE_FORCE_OFF: 1
DL_CRY_ACTUAL_KEY_ID: key_1
DL_CRY_KEY_VAL_ID_key_1: "h1ZpilcYLYRdWp7Nk8X1M1kBPiUi8rdjz9oBfHyUKIk="
RQE_SECRET_KEY: ""
US_HOST: "http://ui-us.ui:8083"
US_MASTER_TOKEN: "fake-us-master-token"
CONFIG_PATH: "/etc/backend-configs/api.yaml"
depends_on:
- ui-us.ui
volumes:
- ./config/analytics/datalens/backend-configs:/etc/backend-configs
ui-data-api.ui:
image: ghcr.io/datalens-tech/datalens-data-api:0.2091.0
environment:
GUNICORN_WORKERS_COUNT: 5
RQE_FORCE_OFF: 1
CACHES_ON: 0
MUTATIONS_CACHES_ON: 0
RQE_SECRET_KEY: ""
DL_CRY_ACTUAL_KEY_ID: key_1
DL_CRY_KEY_VAL_ID_key_1: "h1ZpilcYLYRdWp7Nk8X1M1kBPiUi8rdjz9oBfHyUKIk="
BI_COMPENG_PG_ON: 1
BI_COMPENG_PG_URL: "postgresql://pg-compeng:[email protected]:5432/postgres"
US_HOST: "http://us:8083"
US_MASTER_TOKEN: "fake-us-master-token"
CONFIG_PATH: "/etc/backend-configs/api.yaml"
depends_on:
- ui-us.ui
- persistence-pgcompeng.persistence
volumes:
- ./config/analytics/datalens/backend-configs:/etc/backend-configs
ui-datalens.ui:
container_name: datalens-ui
image: ghcr.io/datalens-tech/datalens-ui:0.1741.0
ports:
- "8855:8080"
depends_on:
- ui-us.ui
- ui-control-api.ui
- ui-data-api.ui
environment:
APP_MODE: "full"
APP_ENV: "production"
APP_INSTALLATION: "opensource"
AUTH_POLICY: "disabled"
US_ENDPOINT: "http://ui-us.ui:8083"
BI_API_ENDPOINT: "http://ui-control-api.ui:8080"
BI_DATA_ENDPOINT: "http://ui-data-api.ui:8080"
NODE_EXTRA_CA_CERTS: "/usr/local/share/ca-certificates/cert.pem"
HC: ${HC:-0}
# Side
mock-server:
image: mockserver/mockserver:5.15.0
ports:
- "5001:1080"
environment:
MOCKSERVER_LOG_LEVEL: TRACE
MOCKSERVER_PROPERTY_FILE: /config/mockserver.properties
MOCKSERVER_INITIALIZATION_JSON_PATH: /config/init.json
volumes:
- ./config/side/mockserver:/config
mailslurper:
container_name: mailslurper
image: marcopas/docker-mailslurper:latest # have to use latest, there are no other option
restart: always
ports:
- "2500:2500"
- "8085:8085"
- "8083:8080"
volumes:
pg_data: { }
zk-data: { }
zk-txn-logs: { }
zk-secrets: { }
pgadmin: { }
sonarqube_data: { }
sonarqube_extensions: { }
sonarqube_logs:
kafka-data: { }
kafka-secrets: { }
schema-registry-secrets: { }
opensearch_data: { }
prometheus_data: { }
keydb_data: { }
ch-data: { }