-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yaml
253 lines (237 loc) · 8.72 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
version: '3.7'
x-clickhouse-defaults: &clickhouse-defaults
restart: on-failure
image: clickhouse/clickhouse-server:22.8.8-alpine
tty: true
depends_on:
- zookeeper-1
# - zookeeper-2
# - zookeeper-3
logging:
options:
max-size: 50m
max-file: "3"
healthcheck: # "clickhouse", "client", "-u ${CLICKHOUSE_USER}", "--password ${CLICKHOUSE_PASSWORD}", "-q 'SELECT 1'"
test: [ "CMD", "wget", "--spider", "-q", "localhost:8123/ping" ]
interval: 30s
timeout: 5s
retries: 3
# ulimits:
# nproc: 65535
# nofile:
# soft: 262144
# hard: 262144
x-clickhouse-depend: &clickhouse-depend
depends_on:
clickhouse:
condition: service_healthy
# clickhouse-2:
# condition: service_healthy
# clickhouse-3:
# condition: service_healthy
services:
# ██████╗ ██████╗ ███████╗████████╗ ██████╗ ██████╗ ███████╗███████╗
# ██╔══██╗██╔═══██╗██╔════╝╚══██╔══╝██╔════╝ ██╔══██╗██╔════╝██╔════╝
# ██████╔╝██║ ██║███████╗ ██║ ██║ ███╗██████╔╝█████╗ ███████╗
# ██╔═══╝ ██║ ██║╚════██║ ██║ ██║ ██║██╔══██╗██╔══╝ ╚════██║
# ██║ ╚██████╔╝███████║ ██║ ╚██████╔╝██║ ██║███████╗███████║
# ╚═╝ ╚═════╝ ╚══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚══════╝
postgres:
container_name: postgres
build:
context: etc/oci/postgres
dockerfile: Dockerfile
environment:
POSTGRES_USER: postgres
POSTGRES_DB: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /data/postgres
POSTGRES_HOST_AUTH_METHOD: md5
volumes:
- postgres:/data/postgres
ports:
- "5432:5432"
networks:
- container-network
restart: "no"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 5s
timeout: 5s
retries: 5
# ███████╗██╗ ██████╗ ███╗ ██╗ ██████╗ ███████╗
# ██╔════╝██║██╔════╝ ████╗ ██║██╔═══██╗╚══███╔╝
# ███████╗██║██║ ███╗██╔██╗ ██║██║ ██║ ███╔╝
# ╚════██║██║██║ ██║██║╚██╗██║██║ ██║ ███╔╝
# ███████║██║╚██████╔╝██║ ╚████║╚██████╔╝███████╗
# ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚══════╝
zookeeper-1:
image: bitnami/zookeeper:3.7.0
container_name: zookeeper-1
hostname: zookeeper-1
user: root
restart: "no"
networks:
- container-network
ports:
- "2181:2181"
- "2888:2888"
- "3888:3888"
volumes:
- zookeeper-data-1:/bitnami/zookeeper
environment:
- ZOO_SERVER_ID=1
# - ZOO_SERVERS=0.0.0.0:2888:3888,zookeeper-2:2888:3888,zookeeper-3:2888:3888
- ALLOW_ANONYMOUS_LOGIN=yes
- ZOO_AUTOPURGE_INTERVAL=1
clickhouse:
<<: *clickhouse-defaults
container_name: clickhouse
hostname: clickhouse
ports:
- "9000:9000"
- "8123:8123"
- "9181:9181"
restart: "no"
networks:
- container-network
volumes:
- ./etc/oci/signoz/clickhouse-config.xml:/etc/clickhouse-server/config.xml
- ./etc/oci/signoz/clickhouse-users.xml:/etc/clickhouse-server/users.xml
- ./etc/oci/signoz/custom-function.xml:/etc/clickhouse-server/custom-function.xml
- ./etc/oci/signoz/clickhouse-cluster.xml:/etc/clickhouse-server/config.d/cluster.xml
# - ./etc/oci/signoz/clickhouse-storage.xml:/etc/clickhouse-server/config.d/storage.xml
- ./etc/oci/signoz/user_scripts:/var/lib/clickhouse/user_scripts/
- clickhouse-data-1:/var/lib/clickhouse/
alertmanager:
image: signoz/alertmanager:${ALERTMANAGER_TAG:-0.23.0-0.2}
volumes:
- alertmanager-data-1:/data
depends_on:
query-service:
condition: service_healthy
restart: "no"
networks:
- container-network
command:
- --queryService.url=http://query-service:8085
- --storage.path=/data
query-service:
image: signoz/query-service:${DOCKER_TAG:-0.16.2}
container_name: query-service
restart: "no"
networks:
- container-network
command: ["-config=/root/config/prometheus.yml"]
# ports:
# - "8080:8080" # query-service port
# - "6060:6060" # pprof port
volumes:
- ./etc/oci/signoz/prometheus.yml:/root/config/prometheus.yml
- ./etc/oci/signoz/dashboards:/root/config/dashboards
- signoz-data-1:/var/lib/signoz/
environment:
- ClickHouseUrl=tcp://clickhouse:9000/?database=signoz_traces
- ALERTMANAGER_API_PREFIX=http://alertmanager:9093/api/
- SIGNOZ_LOCAL_DB_PATH=/var/lib/signoz/signoz.db
- DASHBOARDS_PATH=/root/config/dashboards
- STORAGE=clickhouse
- GODEBUG=netdns=go
- TELEMETRY_ENABLED=false
- DEPLOYMENT_TYPE=docker-standalone-amd
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "localhost:8080/api/v1/health"]
interval: 30s
timeout: 5s
retries: 3
<<: *clickhouse-depend
frontend:
image: signoz/frontend:${DOCKER_TAG:-0.16.2}
container_name: frontend
restart: "no"
networks:
- container-network
depends_on:
- alertmanager
- query-service
ports:
- "3301:3301"
volumes:
- ./etc/oci/signoz/nginx-config.conf:/etc/nginx/conf.d/default.conf
otelcol:
container_name: otelcol
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.66.5}
restart: unless-stopped
networks:
- container-network
command: ["--config=/etc/otel-collector-config.yaml"]
user: root # required for reading docker container logs
volumes:
- ./etc/oci/signoz/otel-collector-config.yaml:/etc/otel-collector-config.yaml
- /run/user/1000/containers:/var/lib/docker/containers:ro
environment:
- OTEL_RESOURCE_ATTRIBUTES=host.name=signoz-host,os.type=linux
- DOCKER_MULTI_NODE_CLUSTER=false
- LOW_CARDINAL_EXCEPTION_GROUPING=false
ports:
# - "1777:1777" # pprof extension
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
- "8889:8889" # signoz spanmetrics exposed by the agent
# - "8888:8888" # OtelCollector internal metrics
# - "9411:9411" # Zipkin port
# - "13133:13133" # health check extension
# - "14250:14250" # Jaeger gRPC
# - "14268:14268" # Jaeger thrift HTTP
# - "55678:55678" # OpenCensus receiver
# - "55679:55679" # zPages extension
<<: *clickhouse-depend
otelcollector-metrics:
image: signoz/signoz-otel-collector:${OTELCOL_TAG:-0.66.5}
container_name: otel-collector-metrics
restart: unless-stopped
networks:
- container-network
command: ["--config=/etc/otel-collector-metrics-config.yaml"]
volumes:
- ./etc/oci/signoz/otel-collector-metrics-config.yaml:/etc/otel-collector-metrics-config.yaml
# ports:
# - "1777:1777" # pprof extension
# - "8888:8888" # OtelCollector internal metrics
# - "13133:13133" # Health check extension
# - "55679:55679" # zPages extension
# <<: *clickhouse-depend
networks:
container-network:
driver: bridge
volumes:
postgres:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: './etc/oci/tmp-data/postgres/14'
zookeeper-data-1:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: './etc/oci/tmp-data/signoz/data/zookeeper-1/'
clickhouse-data-1:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: './etc/oci/tmp-data/signoz/data/clickhouse-1/'
alertmanager-data-1:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: './etc/oci/tmp-data/signoz/data/alertmanager-1/'
signoz-data-1:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: './etc/oci/tmp-data/signoz/data/signoz/'