-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
147 lines (136 loc) · 3.54 KB
/
Copy pathdocker-compose.yml
File metadata and controls
147 lines (136 loc) · 3.54 KB
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
services:
cherry-db-init:
image: mcr.microsoft.com/mssql/server:2019-latest
depends_on:
cherry-db:
condition: service_healthy
volumes:
- ./init-databases.sql:/tmp/init-databases.sql
command: >
bash -c "
echo 'Waiting for SQL Server to be ready...' &&
sleep 10 &&
echo 'Initializing databases...' &&
/opt/mssql-tools18/bin/sqlcmd -S cherry-db -U sa -P YourStrong@Password123 -C -i /tmp/init-databases.sql &&
echo 'Database initialization completed!'
"
cherry-authapi:
build:
context: .
dockerfile: Cherry.Services.AuthAPI/Dockerfile
ports:
- "5001:80"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
depends_on:
- cherry-db-init
cherry-productapi:
build:
context: .
dockerfile: Cherry.Services.ProductAPI/Dockerfile
ports:
- "5002:80"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- ServiceUrls__PublicBaseUrl=http://localhost:5002
volumes:
- ./Cherry.Services.ProductAPI/wwwroot/ProductImages:/app/wwwroot/ProductImages
depends_on:
- cherry-db-init
cherry-couponapi:
build:
context: .
dockerfile: Cherry.Services.CouponAPI/Dockerfile
ports:
- "5003:80"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
depends_on:
- cherry-db-init
cherry-shoppingcartapi:
build:
context: .
dockerfile: Cherry.Services.ShoppingCartAPI/Dockerfile
ports:
- "5004:80"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
depends_on:
- cherry-db-init
cherry-orderapi:
build:
context: .
dockerfile: Cherry.Services.OrderAPI/Dockerfile
ports:
- "5005:80"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
depends_on:
- cherry-db-init
cherry-emailapi:
build:
context: .
dockerfile: Cherry.Services.EmailAPI/Dockerfile
ports:
- "5006:80"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
cherry-rewardapi:
build:
context: .
dockerfile: Cherry.Services.RewardAPI/Dockerfile
ports:
- "5007:80"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
depends_on:
- cherry-db-init
cherry-gateway:
build:
context: .
dockerfile: Cherry.GatewaySolution/Dockerfile
ports:
- "5000:80"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
depends_on:
- cherry-authapi
- cherry-productapi
- cherry-couponapi
- cherry-shoppingcartapi
- cherry-orderapi
- cherry-emailapi
- cherry-rewardapi
cherry-web:
build:
context: .
dockerfile: Cherry.Web/Dockerfile
ports:
- "5008:80"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
depends_on:
- cherry-gateway
cherry-db:
image: mcr.microsoft.com/mssql/server:2019-latest
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=YourStrong@Password123
volumes:
- cherry_db_data:/var/opt/mssql
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P YourStrong@Password123 -C -Q 'SELECT 1'"]
interval: 10s
timeout: 5s
retries: 5
volumes:
cherry_db_data: