-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
159 lines (149 loc) · 4.7 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
version: '3.9'
services:
sqlserver:
image: mcr.microsoft.com/azure-sql-edge
container_name: sqlserver
restart: always
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=Password123
ports:
- 1433:1433
volumes:
- sqlserver:/var/opt/mssql
networks:
- stocknet
mongodb:
image: mongo:latest
container_name: mongodb
restart: always
ports:
- 27017:27017
volumes:
- mongodb:/data/db
networks:
- stocknet
rabbitmq:
image: rabbitmq:3-management
container_name: rabbitmq
restart: always
ports:
- 5672:5672
- 15672:15672
networks:
- stocknet
identity:
image: asfiroth/identity
build:
context: ./src/
dockerfile: StockChat.Identity/Dockerfile
container_name: identity
entrypoint: /bin/sh -c "update-ca-certificates && dotnet StockChat.Identity.dll"
restart: on-failure
ports:
- 6009:6009
environment:
- ConnectionStrings__DefaultConnection=Data Source=sqlserver,1433;User ID=sa;Password=Password123;Initial Catalog=Identity;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=True;Connection Timeout=30;;Persist Security Info=False;
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:6009
- ASPNETCORE_Kestrel__Certificates__Default__Password=P@ssw0rd
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/localhost.pfx
volumes:
- ./localhost.pfx:/https/localhost.pfx:ro
- ./localhost.crt:/usr/local/share/ca-certificates/localhost.crt:ro
depends_on:
- sqlserver
networks:
- stocknet
chat:
image: asfiroth/chat
build:
context: ./src/
dockerfile: StockChat.Api/Dockerfile
container_name: chat
restart: on-failure
entrypoint: /bin/sh -c "update-ca-certificates && dotnet StockChat.Api.dll"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:6010
- ASPNETCORE_Kestrel__Certificates__Default__Password=P@ssw0rd
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/localhost.pfx
- IdentityAuthority=https://identity:6009
- MongoOptions__Connection=mongodb://mongodb:27017
- MongoOptions__Database=stockchat
- RabbitOptions__Connection=amqp://guest:guest@rabbitmq:5672
- RabbitOptions__DecodeQueueName=stock-decode-queue
- RabbitOptions__DecodeExchangeName=stock.decode.exchange
- RabbitOptions__DecodeRoutingKey=decode
- RabbitOptions__ResponseQueueName=stock-response-queue
- RabbitOptions__ResponseExchangeName=stock.response.exchange
- RabbitOptions__ResponseRoutingKey=response
depends_on:
- mongodb
- rabbitmq
- identity
ports:
- 6010:6010
volumes:
- ./localhost.pfx:/https/localhost.pfx:ro
- ./localhost.crt:/usr/local/share/ca-certificates/localhost.crt:ro
networks:
- stocknet
web:
image: asfiroth/web
build:
context: ./src/
dockerfile: StockChat.Web/Dockerfile
container_name: web
entrypoint: /bin/sh -c "update-ca-certificates && dotnet StockChat.Web.dll"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=https://+:6011
- ASPNETCORE_Kestrel__Certificates__Default__Password=P@ssw0rd
- ASPNETCORE_Kestrel__Certificates__Default__Path=/https/localhost.pfx
- Authentication__Authority=https://identity:6009
- Authentication__ClientId=webapp
- Authentication__ClientSecret=49C1A7E1-0C79-4A89-A3D6-A37998FB86B0
- Authentication__Scopes=chatapi.read chatapi.write
- ChatApi=https://chat:6010
volumes:
- ./localhost.pfx:/https/localhost.pfx:ro
- ./localhost.crt:/usr/local/share/ca-certificates/localhost.crt:ro
depends_on:
- chat
- identity
ports:
- 6011:6011
networks:
- stocknet
stock:
image: asfiroth/stock
restart: on-failure
build:
context: ./src/
dockerfile: StockChat.Stock/Dockerfile
container_name: stock
depends_on:
- chat
- identity
- rabbitmq
environment:
- ASPNETCORE_ENVIRONMENT=Development
- StockApi=https://stooq.com
- RabbitOptions__Connection=amqp://guest:guest@rabbitmq:5672
- RabbitOptions__DecodeQueueName=stock-decode-queue
- RabbitOptions__DecodeExchangeName=stock.decode.exchange
- RabbitOptions__DecodeRoutingKey=decode
- RabbitOptions__ResponseQueueName=stock-response-queue
- RabbitOptions__ResponseExchangeName=stock.response.exchange
- RabbitOptions__ResponseRoutingKey=response
networks:
- stocknet
volumes:
sqlserver:
driver: local
mongodb:
driver: local
networks:
stocknet:
driver: bridge