-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
116 lines (108 loc) · 3.33 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
version: '3.3'
services:
mysql:
image: mysql:5.6
ports:
- "3306:3306"
expose:
- 3306
networks:
- backend
restart: always
environment:
MYSQL_ROOT_PASSWORD: "mysqlpwd"
volumes:
- "./db/database.sql:/docker-entrypoint-initdb.d/database.sql"
jaeger:
image: jaegertracing/all-in-one:1.22
networks:
- backend
ports:
- "6831:6831"
- "6832:6832"
- "5778:5778"
- "16686:16686"
- "14268:14268"
- "14250:14250"
tracing-poc:
# for local building
# build: ./
image: iqfarhad/medium-poc_tracing:latest
ports:
- "8080:8080"
networks:
- backend
restart: always
environment:
PORT: ":8080"
DEBUG: "true"
TRACING_OPTION: "otel-collector" # or you can set it as jaeger-collector (traces will export to jaeger-collector straightly)
OTEL_EXPORTER_OTLP_ENDPOINT: "otel-agent:4317"
MYSQL_URL: "root:mysqlpwd@tcp(mysql:3306)/sampleDB"
JAEGER_AGENT_NAME: "jaeger"
JAEGER_AGENT_PORT: "5775"
JAEGER_COLLECTOR_URL: "http://jaeger:14268/api/traces"
QUERYYER_URL: "http://tracing-queryyer:8081/getPerson/"
FORMATTER_URL: "http://tracing-formatter:8082/formatGreeting?"
entrypoint: "/go/bin/tracing-poc"
tracing-queryyer:
# for local building
# build: ./
image: iqfarhad/medium-poc_tracing:latest
ports:
- "8081:8081"
networks:
- backend
restart: always
environment:
PORT: ":8081"
DEBUG: "true"
TRACING_OPTION: "otel-collector" # or you can set it as jaeger-collector (traces will export to jaeger-collector straightly)
OTEL_EXPORTER_OTLP_ENDPOINT: "otel-agent:4317"
JAEGER_AGENT_NAME: "jaeger"
JAEGER_AGENT_PORT: "5775"
MYSQL_URL: "root:mysqlpwd@tcp(mysql:3306)/sampleDB"
JAEGER_COLLECTOR_URL: "http://jaeger:14268/api/traces"
entrypoint: "/go/bin/queryyer"
tracing-formatter:
# for local building
# build: ./
image: iqfarhad/medium-poc_tracing:latest
ports:
- "8082:8082"
networks:
- backend
restart: always
environment:
PORT: ":8082"
DEBUG: "true"
TRACING_OPTION: "otel-collector" # or you can set it as jaeger-collector (traces will export to jaeger-collector straightly)
OTEL_EXPORTER_OTLP_ENDPOINT: "otel-agent:4317"
JAEGER_AGENT_NAME: "jaeger"
JAEGER_AGENT_PORT: "5775"
MYSQL_URL: "root:mysqlpwd@tcp(mysql:3306)/sampleDB"
JAEGER_COLLECTOR_URL: "http://jaeger:14268/api/traces"
entrypoint: "/go/bin/formatter"
otel-agent:
image: otel/opentelemetry-collector:latest
command: ["--config=/etc/otel-agent-config.yaml", "--log-level=DEBUG"]
volumes:
- ./otel-config/config-agent.yaml:/etc/otel-agent-config.yaml
# I'm exposing these port so I could've test my sample app out of docker (optional)
ports:
- "1777:1777" # pprof extension
- "55679:55679" # zpages extension
- "13133" # health_check
- "4317:4317" # OTLP grpc
- "55681:55681" # OLTP HTTP
networks:
- backend
otel-collector:
image: otel/opentelemetry-collector:latest
command: ["--config=/etc/otel-collector-config.yaml", "--log-level=DEBUG"]
volumes:
- ./otel-config/config-collector.yaml:/etc/otel-collector-config.yaml
networks:
- backend
networks:
backend: