-
Notifications
You must be signed in to change notification settings - Fork 18
/
docker-compose.yml
119 lines (111 loc) · 2.62 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
version: "3.9"
# Images
x-traceo-image: &traceo-image traceo/traceo:latest
x-postgres-image: &postgres-image postgres:14
x-clickhouse-image: &clickhouse-image clickhouse/clickhouse-server:23.7.1
x-zookeeper-image: &zookeeper-image zookeeper:3.7.0
x-kafka-image: &kafka-image bitnami/kafka:2.8.1-debian-10-r99
# Envs
x-traceo-environment: &traceo-environment
NODE_ENV: production
PG_HOST: postgres
PG_PORT: 5432
PG_DB_NAME: traceo
PG_PASS: traceo
PG_USER: traceo
KAFKA_CLIENT_ID: traceo-kafka
KAFKA_HOSTS: kafka:29092
KAFKA_GROUP_ID: traceo-kafka-group
CLICKHOUSE_USER: default
CLICKHOUSE_HOST: http://clickhouse:8123
CLICKHOUSE_PASSWORD:
services:
traceo:
container_name: traceo
image: *traceo-image
restart: unless-stopped
environment:
<<: *traceo-environment
ports:
- "3000:3000"
depends_on:
kafka:
condition: service_healthy
postgres:
condition: service_healthy
postgres:
container_name: traceo-db
image: *postgres-image
restart: unless-stopped
ports:
- "5432:5432"
volumes:
- traceo:/var/lib/postgresql/data
environment:
- POSTGRES_DB=traceo
- POSTGRES_USER=traceo
- POSTGRES_PASSWORD=traceo
healthcheck:
test: [
"CMD",
"pg_isready",
"-U",
"traceo"
]
interval: 10s
timeout: 5s
retries: 3
clickhouse:
container_name: traceo-clickhouse
image: *clickhouse-image
restart: on-failure
ports:
- "8123:8123"
- "9000:9000"
- "9440:9440"
- "9009:9009"
depends_on:
- kafka
volumes:
- clickhouse-data:/var/lib/clickhouse
zookeeper:
container_name: traceo-zookeeper
image: *zookeeper-image
restart: on-failure
volumes:
- zookeeper-datalog:/datalog
- zookeeper-data:/data
- zookeeper-logs:/logs
kafka:
container_name: traceo-kafka
image: *kafka-image
restart: on-failure
depends_on:
- zookeeper
healthcheck:
test: [
"CMD",
"kafka-topics.sh",
"--list",
"--bootstrap-server",
"kafka:29092"
]
interval: 10s
timeout: 10s
retries: 5
ports:
- "9092:9092"
- "29092:29092"
environment:
- KAFKA_BROKER_ID=1001
- KAFKA_CFG_RESERVED_BROKER_MAX_ID=1001
- KAFKA_CFG_LISTENERS=PLAINTEXT://:29092
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:29092
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=true
volumes:
traceo:
clickhouse-data:
zookeeper-datalog:
zookeeper-data:
zookeeper-logs: