-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
89 lines (84 loc) · 2.26 KB
/
docker-compose.yml
File metadata and controls
89 lines (84 loc) · 2.26 KB
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
services:
testrunner:
image: $DEV_IMAGE_TAG
environment:
WORK_DIR: $PWD
build:
dockerfile: Dockerfile.dev
context: .
args:
OTP_VERSION: $OTP_VERSION
THRIFT_VERSION: $THRIFT_VERSION
volumes:
- .:$PWD
hostname: progressor
depends_on:
kafka1:
condition: service_healthy
kafka2:
condition: service_healthy
kafka3:
condition: service_healthy
postgres:
condition: service_healthy
working_dir: $PWD
postgres:
image: postgres:15-bookworm
command: >
-c 'wal_level=logical'
-c 'shared_preload_libraries=pg_stat_statements'
-c 'pg_stat_statements.track=all'
-c 'pg_stat_statements.max=10000'
environment:
POSTGRES_DB: "progressor_db"
POSTGRES_USER: "progressor"
POSTGRES_PASSWORD: "progressor"
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U progressor -d progressor_db"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
restart: unless-stopped
deploy:
resources:
limits:
cpus: '2'
memory: 4G
zookeeper:
image: docker.io/confluentinc/cp-zookeeper:${CONFLUENT_PLATFORM_VERSION}
healthcheck:
test: echo ruok | nc 127.0.0.1 2181 || exit -1
interval: 5s
timeout: 240s #🍎
retries: 50
environment:
KAFKA_OPTS: "-Dzookeeper.4lw.commands.whitelist=ruok"
ZOOKEEPER_CLIENT_PORT: 2181
kafka1: &kafka-broker
image: docker.io/confluentinc/cp-kafka:${CONFLUENT_PLATFORM_VERSION}
depends_on:
- zookeeper
healthcheck:
test: ["CMD", "kafka-topics", "--list", "--bootstrap-server", "localhost:9092"]
interval: 5s
timeout: 10s
retries: 5
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka1:9092
kafka2:
<<: *kafka-broker
environment:
KAFKA_BROKER_ID: 2
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka2:9092
kafka3:
<<: *kafka-broker
environment:
KAFKA_BROKER_ID: 3
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka3:9092