-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yaml
151 lines (142 loc) · 3.61 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
version: "3.9"
services:
master-db:
image: docker.io/bitnami/mysql:8.0
container_name: master-db
restart: "no"
ports:
- "3306:3306"
networks:
- multi-data-sources
volumes:
- mysql-data:/bitnami/mysql/data
environment:
MYSQL_REPLICATION_MODE: master
MYSQL_REPLICATION_USER: repl_user
MYSQL_USER: master
MYSQL_DATABASE: billionaires
ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD: root
healthcheck:
test: ["CMD", "/opt/bitnami/scripts/mysql/healthcheck.sh"]
interval: 15s
timeout: 5s
retries: 6
replica-db:
image: docker.io/bitnami/mysql:8.0
container_name: replica-db
restart: "no"
ports:
- "3307:3306"
networks:
- multi-data-sources
depends_on:
- master-db
environment:
MYSQL_REPLICATION_MODE: slave
MYSQL_REPLICATION_USER: repl_user
MYSQL_USER: replica
MYSQL_DATABASE: billionaires
MYSQL_MASTER_HOST: master-db
MYSQL_MASTER_PORT_NUMBER: 3306
MYSQL_MASTER_ROOT_PASSWORD: root
ALLOW_EMPTY_PASSWORD: yes
healthcheck:
test: ["CMD", "/opt/bitnami/scripts/mysql/healthcheck.sh"]
interval: 15s
timeout: 5s
retries: 6
jaeger:
image: jaegertracing/all-in-one:latest
container_name: jaeger
hostname: jaeger
restart: "no"
environment:
COLLECTOR_OTLP_ENABLED: true
METRICS_STORAGE_TYPE: prometheus
PROMETHEUS_SERVER_URL: http://prometheus:9090
ports:
# Agent Zipkin Compact
- "5775:5775/udp"
# Agent Jaeger Compact
- "6831:6831/udp"
# Agent Jaeger Binary
- "6832:6832/udp"
# Agent Configuration HTTP
- "5778:5778"
# Web Interface
- "16686:16686"
# Collector HTTP
- "14268:14268"
# Collector gRPC
- "14250:14250"
depends_on:
- prometheus
networks:
- multi-data-sources
otel-collector:
image: otel/opentelemetry-collector-contrib:0.68.0
container_name: otel-collector
hostname: otel-collector
restart: "no"
command:
- --config=/etc/otel-collector-config.yaml
ports:
- "4317:4317"
- "4318:4318"
- "8888:8888"
- "9999:9999"
volumes:
- ./otel-dev/otel-collector.yaml:/etc/otel-collector-config.yaml
depends_on:
- jaeger
- prometheus
networks:
- multi-data-sources
prometheus:
image: prom/prometheus:v2.41.0
container_name: prometheus
hostname: prometheus
restart: "no"
command:
- --web.console.templates=/etc/prometheus/consoles
- --web.console.libraries=/etc/prometheus/console_libraries
- --storage.tsdb.retention.time=1h
- --storage.tsdb.path=/prometheus
- --web.enable-lifecycle
- --web.route-prefix=/
- --config.file=/etc/prometheus/prometheus.yml
- --web.enable-remote-write-receiver
ports:
- "9090:9090"
volumes:
- ./otel-dev/prometheus.yaml:/etc/prometheus/prometheus.yml
networks:
- multi-data-sources
grafana:
image: grafana/grafana:9.3.2
container_name: grafana
hostname: grafana
restart: "no"
environment:
GF_AUTH_ANONYMOUS_ORG_ROLE: Admin
GF_AUTH_ANONYMOUS_ENABLED: true
GF_AUTH_BASIC_ENABLED: false
ports:
- "3000:3000"
volumes:
- ./otel-dev/ds-prometheus.yaml:/etc/grafana/provisioning/datasources/datasource.yml
depends_on:
- prometheus
networks:
- multi-data-sources
networks:
multi-data-sources:
driver: bridge
volumes:
mysql-data:
driver: local
prometheus-data:
driver: local
grafana-data:
driver: local