-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathdocker-compose-o11y.yaml
208 lines (194 loc) · 5.72 KB
/
docker-compose-o11y.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
version: "3.7"
services:
postgresql:
image: postgres:14-alpine
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=P@ssw0rd
ports:
- 5432:5432
networks:
- coffeeshop-network
rabbitmq:
image: masstransit/rabbitmq:latest
ports:
- "5672:5672"
- "15672:15672"
networks:
- coffeeshop-network
product-service:
image: ghcr.io/thangchung/coffeeshop-on-nomad/product-service:${IMAGE_TAG:-0.1.3}
build:
context: .
dockerfile: ./src/ProductService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- UseTracingExporter=otlp
- UseMetricsExporter=otlp
- UseLogExporter=otlp
- AspNetCoreInstrumentation__RecordException=true
- Otlp__Endpoint=http://otel-collector:4317
ports:
- "5001:5001"
restart: always
networks:
- coffeeshop-network
counter-service:
image: ghcr.io/thangchung/coffeeshop-on-nomad/counter-service:${IMAGE_TAG:-0.1.3}
build:
context: .
dockerfile: ./src/CounterService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ConnectionStrings__counterdb=Server=postgresql;Port=5432;Database=postgres;User Id=postgres;Password=P@ssw0rd
- ProductApiUri=http://product-service:5001
- RabbitMqUrl=rabbitmq
- UseTracingExporter=otlp
- UseMetricsExporter=otlp
- UseLogExporter=otlp
- AspNetCoreInstrumentation__RecordException=true
- Otlp__Endpoint=http://otel-collector:4317
ports:
- "5002:5002"
depends_on:
- postgresql
- rabbitmq
- product-service
restart: always
networks:
- coffeeshop-network
barista-service:
image: ghcr.io/thangchung/coffeeshop-on-nomad/barista-service:${IMAGE_TAG:-0.1.3}
build:
context: .
dockerfile: ./src/BaristaService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ConnectionStrings__baristadb=Server=postgresql;Port=5432;Database=postgres;User Id=postgres;Password=P@ssw0rd
- RabbitMqUrl=rabbitmq
- UseTracingExporter=otlp
- UseMetricsExporter=otlp
- UseLogExporter=otlp
- AspNetCoreInstrumentation__RecordException=true
- Otlp__Endpoint=http://otel-collector:4317
ports:
- "5003:5003"
depends_on:
- postgresql
- rabbitmq
restart: always
networks:
- coffeeshop-network
kitchen-service:
image: ghcr.io/thangchung/coffeeshop-on-nomad/kitchen-service:${IMAGE_TAG:-0.1.3}
build:
context: .
dockerfile: ./src/KitchenService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ConnectionStrings__kitchendb=Server=postgresql;Port=5432;Database=postgres;User Id=postgres;Password=P@ssw0rd
- RabbitMqUrl=rabbitmq
- UseTracingExporter=otlp
- UseMetricsExporter=otlp
- UseLogExporter=otlp
- AspNetCoreInstrumentation__RecordException=true
- Otlp__Endpoint=http://otel-collector:4317
ports:
- "5004:5004"
depends_on:
- postgresql
- rabbitmq
restart: always
networks:
- coffeeshop-network
reverse-proxy:
image: ghcr.io/thangchung/coffeeshop-on-nomad/reverse-proxy:${IMAGE_TAG:-0.1.3}
build:
context: .
dockerfile: ./src/ReverseProxy/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ReverseProxy__Clusters__productApiCluster__Destinations__destination1__Address=http://product-service:5001
- ReverseProxy__Clusters__counterApiCluster__Destinations__destination1__Address=http://counter-service:5002
- UseTracingExporter=otlp
- UseMetricsExporter=otlp
- UseLogExporter=otlp
- AspNetCoreInstrumentation__RecordException=true
- Otlp__Endpoint=http://otel-collector:4317
ports:
- "8080:8080"
depends_on:
- postgresql
- counter-service
- barista-service
- kitchen-service
restart: always
networks:
- coffeeshop-network
# datagen-app:
# image: ghcr.io/thangchung/coffeeshop-on-nomad/datagen-app:${IMAGE_TAG:-0.1.3}
# build:
# context: .
# dockerfile: ./src/DataGen/Dockerfile
# environment:
# - CoffeeShopApi=http://reverse-proxy:8080
# - SubmitOrderRoute=/counter-api/v1/api/orders
# depends_on:
# - reverse-proxy
# restart: always
# networks:
# - coffeeshop-network
# Jaeger
jaeger-all-in-one:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686"
- "14268"
- "14250"
networks:
- coffeeshop-network
# Zipkin
zipkin-all-in-one:
image: openzipkin/zipkin:latest
ports:
- "9411:9411"
networks:
- coffeeshop-network
# Collector
otel-collector:
image: otel/opentelemetry-collector-contrib-dev:latest
command: ["--config=/etc/otel-collector-config.yaml", ""]
volumes:
- ./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
- "55679:55679" # zpages extension
depends_on:
- jaeger-all-in-one
- zipkin-all-in-one
networks:
- coffeeshop-network
prometheus:
container_name: prometheus
image: prom/prometheus:latest
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
networks:
- coffeeshop-network
elk:
image: sebp/elk:latest
ports:
- "5601:5601"
- "9200:9200"
- "5044:5044"
networks:
- coffeeshop-network
networks:
coffeeshop-network: