-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
249 lines (246 loc) · 6.35 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
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
networks:
custom:
ipam:
config:
- subnet: 10.5.0.0/16
services:
postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=postgrespw
ports:
- 5432:5432
volumes:
- /var/lib/postresql/data
networks:
custom:
mongodb:
image: mongo
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=mongopw
ports:
- 27017:27017
volumes:
- /var/lib/mongodb/data
networks:
custom:
rabbitmq:
image: rabbitmq:3-management-alpine
ports:
- 5672:5672
- 15672:15672
networks:
custom:
auction-svc:
image: amg31/auction-svc:latest
build:
context: .
dockerfile: src/AuctionService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- ASPNETCORE_URLS=http://+:7777
- RabbitMq__Host=rabbitmq
- ConnectionStrings__DefaultConnection=Server=postgres:5432;User Id=postgres;Password=postgrespw;Database=auctions
- IdentityServiceUrl=http://identity-svc
- Kestrel__Endpoints__Grpc__Protocols=Http2
- Kestrel__Endpoints__Grpc__Url=http://+:7777
- Kestrel__Endpoints__WebApi__Protocols=Http1
- Kestrel__Endpoints__WebApi__Url=Http://+:80
ports:
- 7001:80
- 7777:7777
depends_on:
- postgres
- rabbitmq
networks:
custom:
search-svc:
image: amg31/search-svc:latest
build:
context: .
dockerfile: src/SearchService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- RabbitMq__Host=rabbitmq
- ConnectionStrings__MongoDbConnection=mongodb://root:mongopw@mongodb
- AuctionServiceUrl=http://auction-svc
ports:
- 7002:80
depends_on:
- mongodb
- rabbitmq
networks:
custom:
identity-svc:
image: amg31/identity-svc:latest
build:
context: .
dockerfile: src/IdentityService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://+:80
- ClientApp=http://app.auctionnext.com
- ConnectionStrings__DefaultConnection=Server=postgres:5432;User Id=postgres;Password=postgrespw;Database=identity
- VIRTUAL_HOST=id.auctionnext.com
depends_on:
- postgres
networks:
custom:
ipv4_address: 10.5.0.200
gateway-svc:
image: amg31/gateway-svc:latest
build:
context: .
dockerfile: src/GatewayService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://+:80
- ClientApp=https://app.auctionnext.com
- VIRTUAL_HOST=api.auctionnext.com
networks:
custom:
bid-svc:
image: amg31/bid-svc:latest
build:
context: .
dockerfile: src/BiddingService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- RabbitMq__Host=rabbitmq
- ConnectionStrings__BidDbConnection=mongodb://root:mongopw@mongodb
- IdentityServiceUrl=http://identity-svc
- GrpcAuction=http://auction-svc:7777
ports:
- 7003:80
depends_on:
- mongodb
- rabbitmq
networks:
custom:
notify-svc:
image: amg31/notify-svc:latest
build:
context: .
dockerfile: src/NotificationService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- RabbitMq__Host=rabbitmq
ports:
- 7004:80
depends_on:
- rabbitmq
networks:
custom:
payment-svc:
image: amg31/payment-svc:latest
build:
context: .
dockerfile: src/PaymentService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- ConnectionStrings__DefaultConnection=Server=postgres:5432;User Id=postgres;Password=postgrespw;Database=payments
- IdentityServiceUrl=http://identity-svc
- RabbitMq__Host=rabbitmq
ports:
- 7005:80
depends_on:
- postgres
- rabbitmq
networks:
custom:
post-svc:
image: amg31/post-svc:latest
build:
context: .
dockerfile: src/PostService/Dockerfile
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- RabbitMq__Host=rabbitmq
- ConnectionStrings__MongoDbConnection=mongodb://root:mongopw@mongodb
- AuctionServiceUrl=http://auction-svc
ports:
- 7006:80
depends_on:
- mongodb
- rabbitmq
networks:
custom:
web-app:
image: amg31/web-app
build:
context: .
dockerfile: frontend/web-app/Dockerfile
volumes:
- /var/lib/web/data
extra_hosts:
- id.auctionnext.com:10.5.0.200
environment:
- NEXTAUTH_SECRET=somethingreallyreallysecret
- NEXTAUTH_URL=http://app.auctionnext.com
- NEXTAUTH_URL_INTERNAL=http://web-app:3000
- API_URL=http://gateway-svc/
- ID_URL=http://id.auctionnext.com
- NEXT_PUBLIC_NOTIFY_URL=http://gateway-svc/notifications
- VIRTUAL_HOST=app.auctionnext.com
- NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51NKl9DJCh47a7Nh113trEHxzNk32tOgF5qtNOCfO2Jb5Hc7D8lC7kY4pVm6L7cQkaY5di4VNw0UPAuGrMSb4e9XB00NfTT04a5
- VIRTUAL_PORT=3000
networks:
custom:
nginx-proxy:
image: nginxproxy/nginx-proxy
ports:
- 80:80
- 443:443
networks:
custom:
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./devcerts:/etc/nginx/certs
prometheus:
image: prom/prometheus:latest
volumes:
- prometheus-data:/prometheus # Mount named volume to store data
- ./prometheus.yml:/etc/prometheus/prometheus.yml
ports:
- "9090:9090"
networks:
custom:
ipv4_address: 10.5.0.100
grafana:
image: grafana/grafana:latest
volumes:
- grafana-data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=1dV5AXIWxfsx79rn # Change this to a strong password
ports:
- "3000:3000"
networks:
custom:
ipv4_address: 10.5.0.101
depends_on:
- prometheus
#
# redis-stack:
# image: redis/redis-stack:latest
# ports:
# - 6379:6379
# - 8001:8001
# networks:
# custom:
# volumes:
# - redis-data:/var/lib/redis/data
#
volumes:
prometheus-data:
grafana-data:
# redis-data:
# postgresdata:
# mongodata:
# rabbitmq: