-
Notifications
You must be signed in to change notification settings - Fork 95
/
docker-compose.yaml
89 lines (81 loc) · 2.59 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
version: "3.8"
services:
client:
build:
context: ./Client
dockerfile: ../Dockerfile # installs OpenTelemetry .NET Automatic Instrumentation
entrypoint: "./out/Examples.Client http://service:5000"
env_file:
- otel-dotnet.env # enables OpenTelemetry .NET Automatic Instrumentation
environment:
# OpenTelemetry environmental variables:
OTEL_SERVICE_NAME: "client"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector:4318"
depends_on:
- service
- otel-collector
service:
build:
context: ./Service
dockerfile: ../Dockerfile # installs OpenTelemetry .NET Automatic Instrumentation
entrypoint: "./out/Examples.Service --urls http://*:5000"
env_file:
- otel-dotnet.env # enable OpenTelemetry .NET Automatic Instrumentation
environment:
DB_CONNECTION: "Server=sqlserver,1433;User=sa;Password=yourStrong(!)Password;TrustServerCertificate=True;"
# OpenTelemetry environmental variables:
OTEL_SERVICE_NAME: "service"
OTEL_EXPORTER_OTLP_ENDPOINT: "http://otel-collector:4318"
OTEL_DOTNET_AUTO_TRACES_ADDITIONAL_SOURCES: "Examples.Service"
OTEL_DOTNET_AUTO_METRICS_ADDITIONAL_SOURCES: "Examples.Service"
depends_on:
- sqlserver
- otel-collector
sqlserver:
image: mcr.microsoft.com/mssql/server:2019-CU17-ubuntu-20.04
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=yourStrong(!)Password
ports:
- "1433:1433"
# OpenTelemetry Collector
otel-collector:
image: otel/opentelemetry-collector-contrib:0.88.0
volumes:
- ./otel-config.yaml:/etc/otel/config.yaml
- ./log:/log/otel
command: --config /etc/otel/config.yaml
environment:
JAEGER_ENDPOINT: "jaeger:4317"
LOKI_ENDPOINT: "http://loki:3100/loki/api/v1/push"
ports:
- "8889:8889" # Prometheus metrics exporter (scrape endpoint)
- "13133:13133" # health_check extension
- "55679:55679" # ZPages extension
depends_on:
- jaeger
- prometheus
- loki
jaeger:
image: jaegertracing/all-in-one:1.50.0
ports:
- "16686:16686" # Jaeger Web UI
prometheus:
image: prom/prometheus:v2.42.0
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
loki:
image: grafana/loki:2.7.4
ports:
- "3100:3100"
grafana:
image: grafana/grafana:9.4.3
volumes:
- ./grafana-datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml
environment:
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
ports:
- "3000:3000"