-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdocker-compose.yaml
107 lines (98 loc) · 3.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version: "2"
services:
mongo:
image: mongo:5.0.4
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=admin
- MONGO_INITDB_DATABASE=backend
ports:
- "27017:27017"
volumes:
- ./services/utils/mongodb/init:/docker-entrypoint-initdb.d
# - ./services/utils/mongodb/data:/data/db
redis:
image: redis:5.0.13
ports:
- "6379:6379"
# volumes:
# - ./services/utils/redis/data:/data
template-service:
image: martinnirtl/demos.opentelemetry.template-service:latest
build: services/template-service
# entrypoint: ["tail", "-f", "/dev/null"]
command: ["-r", "./src/tracing-dev.js", "src/index.js"]
environment:
- PORT=4200
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=2
- OTEL_ENDPOINT_URL=grpc://otel-collector:4317 # The CollectorTraceExporter in Node expects the URL to only be the hostname. It will not work with /v1/traces.
ports:
- "4200:4200"
mail-service:
image: martinnirtl/demos.opentelemetry.mail-service:latest
build: services/mail-service
# entrypoint: ["tail", "-f", "/dev/null"]
command: ["-r", "./src/tracing.js", "src/index.js"]
environment:
- PORT=4100
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_DB=1
- TEMPLATE_SERVICE_GRPC=template-service:4200
- OTEL_ENDPOINT_URL=grpc://otel-collector:4317 # The CollectorTraceExporter in Node expects the URL to only be the hostname. It will not work with /v1/traces.
# - OTEL_AUTH_HEADER= # Using otel-collector as gateway.
ports:
- "4100:4100"
backend:
image: martinnirtl/demos.opentelemetry.backend:latest
build: services/backend
# entrypoint: ["tail", "-f", "/dev/null"]
command: ["-r", "./src/tracing-dev.js", "src/index.js"]
environment:
- PORT=4000
- DB_CONNECTION_URL=mongodb://backend:swordfish@mongo:27017/backend # Use variable expansion for username and password.
- MAIL_SERVICE_BASE_URL=http://mail-service:4100
- OTEL_ENDPOINT_URL=grpc://otel-collector:4317 # The CollectorTraceExporter in Node expects the URL to only be the hostname. It will not work with /v1/traces.
ports:
- "4000:4000"
# loadgen:
# image: martinnirtl/demos.opentelemetry.loadgen:latest
# build: services/loadgen
# # entrypoint: ["tail", "-f", "/dev/null"]
# environment:
# - BACKEND_BASE_URL=http://backend:4000
otel-collector:
image: otel/opentelemetry-collector:latest
command: ["--config=/etc/otel-collector-config.yaml"]
environment:
- OTEL_ENDPOINT_URL # Set via .env file
- OTEL_AUTH_HEADER # Set via .env file
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
# - "55670:55679" # zpages extension
volumes:
- ./services/otel/config-dev.yaml:/etc/otel-collector-config.yaml
tempo:
image: grafana/tempo:latest
command: [ "-config.file=/etc/tempo.yaml" ]
volumes:
- ./services/utils/tempo.yaml:/etc/tempo.yaml
# - ./tempo-data:/tmp/tempo
grafana:
image: grafana/grafana-oss:8.3.4
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
ports:
- "3000:3000"
volumes:
- ./services/utils/grafana-datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml