-
Notifications
You must be signed in to change notification settings - Fork 9
/
docker-compose.yml
108 lines (103 loc) · 2.58 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
services:
zookeeper:
image: confluentinc/cp-zookeeper:7.4.0
container_name: zookeeper
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
KAFKA_OPTS: "-Dzookeeper.4lw.commands.whitelist=ruok"
ports:
- "2288:2181"
restart: unless-stopped
healthcheck:
test: |
IFS= read ret << EOF
$$(echo ruok | nc localhost 2181)
EOF
if [ "$$ret" = "imok" ]
then
exit 0
fi
exit 1
interval: 5s
timeout: 5s
retries: 10
kafka:
image: confluentinc/cp-kafka:7.4.0
depends_on:
zookeeper:
condition: service_healthy
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:9941
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
KAFKA_DEFAULT_REPLICATION_FACTOR: 1
KAFKA_NUM_PARTITIONS: 3
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_CREATE_TOPICS: "push-mygame_apns-single"
restart: unless-stopped
ports:
- "9092:9092"
- "9941:9941"
healthcheck:
test: kafka-topics --list --bootstrap-server localhost:9941
interval: 5s
timeout: 20s
retries: 10
postgres:
image: postgres:13
container_name: postgres
environment:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- "8585:5432"
restart: unless-stopped
healthcheck:
test: pg_isready
interval: 5s
timeout: 5s
retries: 10
statsd:
image: hopsoft/graphite-statsd
ports:
- "80:80"
- "2003-2004:2003-2004"
- "2023-2024:2023-2024"
- "40001:8125/udp"
- "40002:8126"
restart: unless-stopped
healthcheck:
test: |
IFS= read ret << EOF
$$(echo health | nc localhost 8126)
EOF
if [ "$$ret" != "health: up" ]
then
exit 0
fi
exit 1
interval: 5s
timeout: 5s
retries: 10
kafka-ui:
image: docker.redpanda.com/vectorized/console:latest
ports:
- 9000:8080
depends_on:
kafka:
condition: service_healthy
environment:
KAFKA_BROKERS: kafka:9092
redis:
image: redis:6.0.9-alpine
ports:
- "6379:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3