-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yaml
180 lines (168 loc) · 5.05 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
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
version: '3.9'
services:
api-orders:
container_name: api-orders
build:
context: ./src
dockerfile: Services/Orders.Api/Dockerfile
ports:
- "9001:80"
- "9101:443"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- USERS_API_URI=http://api-users
- INVENTORY_API_URI=http://api-inventory
- BROKER_URI=activemq:tcp://active-mq:61616
- ORDER_PROCESSING_QUEUE_NAME=OrderProcessing
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
- ConnectionStrings:DefaultConnection=Server=db-sqlserver;Database=orderdb;User ID=SA;Password=P@ssw0rD;TrustServerCertificate=true
depends_on:
- otel-collector
- db-sqlserver
- active-mq
api-users:
container_name: api-users
build:
context: ./src
dockerfile: Services/Users.Api/Dockerfile
ports:
- "9002:80"
- "9102:443"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
- ConnectionStrings:DefaultConnection=Server=db-sqlserver;Database=userdb;User ID=SA;Password=P@ssw0rD;TrustServerCertificate=true
depends_on:
- otel-collector
- db-sqlserver
- active-mq
api-inventory:
container_name: api-inventory
build:
context: ./src
dockerfile: Services/Inventory.Api/Dockerfile
ports:
- "9003:80"
- "9103:443"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
depends_on:
- otel-collector
svc-fulfillment:
container_name: svc-fulfillment
build:
context: ./src
dockerfile: Services/Fulfillment/Dockerfile
ports:
- "9004:80"
- "9104:443"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- BROKER_URI=activemq:tcp://active-mq:61616
- ORDER_PROCESSING_QUEUE_NAME=OrderProcessing
- NOTIFICATION_PROCESSING_TOPIC_NAME=NotificationProcessing
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
depends_on:
- otel-collector
- active-mq
- api-orders
- api-users
- api-inventory
svc-mail-notification:
container_name: svc-mail-notification
build:
context: ./src
dockerfile: Services/MailNotification/Dockerfile
ports:
- "9005:80"
- "9105:443"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- BROKER_URI=activemq:tcp://active-mq:61616
- NOTIFICATION_PROCESSING_TOPIC_NAME=NotificationProcessing
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
depends_on:
- otel-collector
- active-mq
- api-orders
- api-users
- api-inventory
svc-phone-notification:
container_name: svc-phone-notification
build:
context: ./src
dockerfile: Services/PhoneNotification/Dockerfile
ports:
- "9006:80"
- "9106:443"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- BROKER_URI=activemq:tcp://active-mq:61616
- NOTIFICATION_PROCESSING_TOPIC_NAME=NotificationProcessing
- OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4318
- OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
depends_on:
- otel-collector
- active-mq
- api-orders
- api-users
- api-inventory
active-mq:
container_name: active-mq
image: "rmohr/activemq:latest"
ports:
- 61616:61616 # JMS
- 5672:5672 # AMQP
- 8161:8161 # UI
db-sqlserver:
container_name: db-sqlserver
image: "mcr.microsoft.com/mssql/server:2022-latest"
ports:
- "1440:1433"
environment:
MSSQL_SA_PASSWORD: "P@ssw0rD"
ACCEPT_EULA: "Y"
MSSQL_PID: "Express"
otel-collector:
container_name: otel-collector
image: otel/opentelemetry-collector-contrib: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
- "4318:4318" # OTLP http receiver
- "55679:55679" # zpages extension
depends_on:
- jaeger
- zipkin
- prometheus
jaeger:
container_name: jaeger
image: jaegertracing/all-in-one:latest
ports:
- "14250:14250"
- "14268:14268"
- "16686:16686"
zipkin:
container_name: zipkin
image: openzipkin/zipkin:latest
ports:
- "9411:9411"
prometheus:
container_name: prometheus
image: prom/prometheus:latest
volumes:
- ./prometheus.yaml:/etc/prometheus/prometheus.yml # the config file in container must have the file extension ".yml"
ports:
- "9090:9090"