-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
135 lines (124 loc) · 3.93 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
# I added this file using explorer and named it docker-compose.yaml
# *.yaml extension does not seem to be supported by rider or vs. So i changed extension to *.yml .
# Then i opened vs and added "container orchestration support" and it used this file automatically.
# If you encounter issues such as "service does not have an image or context" that means that you need to
# delete .vs, obj and bin folders. Also i deleted .idea folder to make sure that everything works.
# Rider 2023.1 Visual Studio 2022. (02.01.2024)
version: "3.8"
services:
auction_svc:
container_name: auction_svc_name
build:
dockerfile: AuctionService/Dockerfile
context: .
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- ASPNETCORE_URLS=http://+:7777
- RabbitMQ__Host=rabbitmq_name
- RabbitMQ__Username=guest
- RabbitMQ__Password=guest
- IdentityServiceUrl=http://identity_svc_name
- ConnectionStrings__DefaultConnection=Server=auction_db_name:5432; User Id=postgres;Password=postgrespw;Database=auctions
- Kestrel__Endpoints__Grpc__Protocols=Http2
- Kestrel__Endpoints__Grpc__Url=Http://+:7777
- Kestrel__Endpoints__WebApi__Protocols=Http1
- Kestrel__Endpoints__WebApi__Url=Http://+:80
depends_on:
- auction_db
- rabbitmq
ports:
- 7001:80
- 7777:7777
bid_svc:
container_name: bid_svc_name
build:
dockerfile: BiddingService/Dockerfile
context: .
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- ASPNETCORE_URLS=http://+:7003
- RabbitMQ__Host=rabbitmq_name
- RabbitMQ__Username=guest
- RabbitMQ__Password=guest
- IdentityServiceUrl=http://identity_svc_name
- ConnectionStrings__BidDbConnection=mongodb://root:mongopw@search_db_name
- GrpcAuction=http://auction_svc:7777
depends_on:
- auction_svc
- search_db
ports:
- 7003:7003
search_svc:
container_name: search_svc_name
build:
dockerfile: SearchService/Dockerfile
context: .
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- RabbitMQ__Host=rabbitmq_name
- RabbitMQ__Username=guest
- RabbitMQ__Password=guest
- ConnectionStrings__MongoDbConnection=mongodb://root:mongopw@search_db_name
- AuctionServiceUrl=http://auction_svc_name
depends_on:
- search_db
- rabbitmq
ports:
- 7002:80
identity_svc:
container_name: identity_svc_name
build:
dockerfile: IdentityService/Dockerfile
context: .
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- RabbitMQ__Host=rabbitmq_name
- RabbitMQ__Username=guest
- RabbitMQ__Host=guest
- IdentityServiceUrl=http://identity_svc_name
- ConnectionStrings__DefaultConnection=Server=auction_db_name:5432; User Id=postgres;Password=postgrespw;Database=Identity
- IssuerUri=http://identity_svc_name
ports:
- 5000:80
gateway_svc:
container_name: gateway_svc_name
build:
dockerfile: GatewayService/Dockerfile
context: .
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://+:80
ports:
- 6001:80
auction_db:
container_name: auction_db_name
image: postgres
ports:
- 5432:5432
environment:
- POSTGRES_PASSWORD=postgrespw
volumes:
- auction_db:/var/lib/postgresql/data
search_db:
container_name: search_db_name
image: mongo
ports:
- 27017:27017
environment:
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=mongopw
volumes:
- search_db:/var/lib/mongodb/data
rabbitmq:
container_name: rabbitmq_name
image: rabbitmq:3-management-alpine
ports:
- 5672:5672
- 15672:15672
volumes:
auction_db:
search_db: