-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
236 lines (229 loc) · 6.33 KB
/
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
x-default-policy: &default_policy
restart: unless-stopped
networks:
- xql-perfect-guide
services:
waiter-service:
<<: *default_policy
# LogQLでcontainerタグにする
container_name: waiter-service
build:
context: ./service/waiter/
dockerfile: Dockerfile
environment:
LOG_LEVEL: info
APP_VERSION: v1.0.0
SERVICE_NAME: waiter-service
TRACE_BACKEND_ADDRESS: otel-collector:4317
ports:
- "8080:8080"
depends_on:
- tempo
- otel-collector
develop:
watch:
- action: rebuild
path: service/waiter
chef-service:
<<: *default_policy
container_name: chef-service
build:
context: ./service/chef/
dockerfile: Dockerfile
environment:
LOG_LEVEL: info
APP_VERSION: v1.0.0
SERVICE_NAME: chef-service
TRACE_BACKEND_ADDRESS: otel-collector:4317
CHEF_SERIVCE_HOST: "0.0.0.0"
CHEF_SERIVCE_PORT: 8090
OTEL_SERVICE_NAME: chef-service
OTEL_TRACES_EXPORTER: otlp
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
OTEL_EXPORTER_OTLP_ENDPOINT: otel-collector:4317
OTEL_EXPORTER_OTLP_INSECURE: True
ports:
- "8090:8090"
depends_on:
- tempo
- otel-collector
develop:
watch:
- action: rebuild
path: service/chef/
bb-productions:
<<: *default_policy
container_name: bb-productions
build:
context: ./service/bb-productions/
dockerfile: Dockerfile
environment:
BB_PROD_HOST: "0.0.0.0"
BB_PROD_PORT: 8091
BB_PROD_DB_USER: ${DB_USER}
BB_PROD_DB_PASSWORD: ${DB_PASSWORD}
BB_PROD_DB_HOST: "mysql-bb-productions"
BB_PROD_DB_NAME: "bb"
BB_PROD_DB_PORT: "3306"
BB_PROD_MEMCACHE_HOST: "memcached"
BB_PROD_MEMCACHE_PORT: "11211"
BB_PROD_MEMCACHE_EXPIRE_TIME: "5"
OTEL_SERVICE_NAME: bb-productions
OTEL_TRACES_EXPORTER: otlp
OTEL_EXPORTER_OTLP_PROTOCOL: grpc
OTEL_EXPORTER_OTLP_ENDPOINT: otel-collector:4317
OTEL_EXPORTER_OTLP_INSECURE: True
ports:
- "8091:8091"
depends_on:
- tempo
- otel-collector
- mysql-bb-productions
develop:
watch:
- action: rebuild
path: service/bb-productions/
mysql-bb-productions:
<<: *default_policy
container_name: mysql-bb-productions
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: bb
MYSQL_USER: bb
MYSQL_PASSWORD: ${DB_PASSWORD}
ports:
- "3307:3306"
volumes:
- ./service/bb-productions/assets/init.sql:/docker-entrypoint-initdb.d/init.sql
memcached:
<<: *default_policy
container_name: memcached
image: memcached:1.6.9
ports:
- "11211:11211"
grafana:
<<: *default_policy
container_name: grafana
image: grafana/grafana:11.0.0
volumes:
- ./grafana/dashboards:/var/lib/grafana/dashboards
- ./grafana/dashboard.yaml:/etc/grafana/provisioning/dashboards/main.yaml
- ./grafana/datasources:/etc/grafana/provisioning/datasources
- ./grafana/plugins:/etc/grafana/provisioning/plugins
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_DISABLE_LOGIN_FORM=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_USERS_DEFAULT_THEME=light
- GF_INSTALL_PLUGINS=https://storage.googleapis.com/integration-artifacts/grafana-lokiexplore-app/grafana-lokiexplore-app-latest.zip;grafana-lokiexplore-app
ports:
- 3000:3000
depends_on:
- prometheus
- loki
- promtail
- tempo
prometheus:
<<: *default_policy
container_name: prometheus
image: prom/prometheus:v2.51.2
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--enable-feature=exemplar-storage"
volumes:
- ./prometheus:/etc/prometheus
- prom_data:/prometheus
ports:
- 9090:9090
loki:
<<: *default_policy
container_name: loki
image: grafana/loki:3.0.0
command: "-config.file=/etc/loki/loki.yaml"
environment:
LOG_CLUSTER_DEPTH: '8'
LOG_SIM_TH: '0.3'
volumes:
- ./loki/loki.yaml:/etc/loki/loki.yaml
ports:
- 3100:3100
- 7946
- 9095
logcli:
container_name: logcli
image: grafana/logcli:3.0.0
environment:
LOKI_ADDR: http://loki:3100
LOKI_ORG_ID: tenant1
networks:
- xql-perfect-guide
promtail:
<<: *default_policy
container_name: promtail
image: grafana/promtail:2.9.6
command: "-config.file=/etc/promtail/promtail.yaml"
volumes:
- ./promtail:/etc/promtail/
- /var/run/docker.sock:/var/run/docker.sock
tempo:
<<: *default_policy
container_name: tempo
image: grafana/tempo:2.4.1
command: "-config.file=/etc/tempo.yaml"
volumes:
- ./tempo/tempo.yaml:/etc/tempo.yaml
ports:
- "3200:3200"
- "4317" # otlp grpc
- "4318" # otlp http
minio:
<<: *default_policy
container_name: minio
image: minio/minio:RELEASE.2024-04-06T05-26-02Z
restart: unless-stopped
entrypoint: sh
# command: -c 'mkdir -p /export/loki && /usr/bin/minio server /export'
command: -c '/usr/bin/minio server /export'
environment:
- MINIO_ACCESS_KEY=loki
- MINIO_SECRET_KEY=supersecret
volumes:
- ./data/minio:/export
ports:
- 9000:9000
otel-collector:
<<: *default_policy
container_name: otel-collector
image: otel/opentelemetry-collector-contrib:0.98.0
restart: always
command: ["--config=/etc/otel-collector-config.yaml", "${OTELCOL_ARGS}"]
volumes:
- ./otel-collector/otel-collector-config.yaml:/etc/otel-collector-config.yaml
ports:
- "1888:1888" # pprof extension
- "8888:8888" # Prometheus metrics exposed by the collector
- "8889:8889" # Prometheus exporter metrics
- "13133:13133" # health_check extension
- "4317:4317" # OTLP gRPC receiver
- "4318:4318" # OTLP HTTP receiver
- "55679:55679" # zpages extension
depends_on:
- tempo
k6:
container_name: k6
<<: *default_policy
image: grafana/k6:0.50.0
volumes:
- ./k6/script.js:/app/script.js
command: ["run", "/app/script.js"]
environment:
- BASE_URL=http://waiter-service:8080
depends_on:
- waiter-service
- chef-service
- bb-productions
networks:
xql-perfect-guide:
volumes:
prom_data: