forked from bradygaster/dotnet-cloud-native-build-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
141 lines (130 loc) · 3.28 KB
/
docker-compose.yml
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
version: "3.9"
services:
proxy:
container_name: proxy
hostname: proxy
ports:
- 4999:8080
build:
context: .
dockerfile: ./ContosoOnline/Proxy/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ORDERS_API=http://orders:8080
- STORE_UI=http://store:8080
- ZIPKIN_URL=http://zipkin:9411
depends_on:
- prometheus
- zipkin
- orders
- store
store:
container_name: store
hostname: store
ports:
- 5003:8080
build:
context: .
dockerfile: ./ContosoOnline/Store/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- PRODUCTS_URL=http://products:8080
- ORDERS_URL=http://orders:8080
- ZIPKIN_URL=http://zipkin:9411
depends_on:
- prometheus
- zipkin
- orders
- products
orders:
container_name: orders
hostname: orders
ports:
- 5000:8080
build:
context: .
dockerfile: ./ContosoOnline/Orders/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ZIPKIN_URL=http://zipkin:9411
- ConnectionStrings__OrdersDb=Server=ordersdb;Port=5432;Database=orders;User Id=postuser;Password=example
depends_on:
- prometheus
- zipkin
- ordersdb
products:
container_name: products
hostname: products
ports:
- 5001:8080
- 8081
build:
context: .
dockerfile: ./ContosoOnline/Products/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ZIPKIN_URL=http://zipkin:9411
- Kestrel__Endpoints__HTTP__Url=http://0.0.0.0:8081
- Kestrel__Endpoints__GRPC__Url=http://0.0.0.0:8080
- Kestrel__Endpoints__GRPC__Protocols=Http2
depends_on:
- prometheus
- zipkin
orderprocessor:
container_name: orderprocessor
hostname: orderprocessor
build:
context: .
dockerfile: ./ContosoOnline/OrderProcessor/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- PRODUCTS_URL=http://products:8080
- ORDERS_URL=http://orders:8080
- ZIPKIN_URL=http://zipkin:9411
depends_on:
- products
- orders
- zipkin
ordersdb:
container_name: ordersdb
hostname: ordersdb
image: 'postgres:latest'
ports:
- '5432:5432'
environment:
POSTGRES_PASSWORD: example
POSTGRES_USER: postuser
POSTGRES_DB: orders
volumes:
- orders_data:/var/lib/postgresql/data
zipkin:
image: openzipkin/zipkin
ports:
- 9411:9411
prometheus:
image: prom/prometheus
container_name: prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- 9090:9090
restart: unless-stopped
volumes:
- ./prometheus:/etc/prometheus
- prom_data:/prometheus
grafana:
image: grafana/grafana
container_name: grafana
ports:
- 3000:3000
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=grafana
volumes:
- ./grafana/datasource:/etc/grafana/provisioning/datasources
- ./grafana/dashboard/dashboard.yml:/etc/grafana/provisioning/dashboards/main.yaml
- ./grafana/dashboards:/var/lib/grafana/dashboards
volumes:
prom_data:
orders_data: