@@ -7,21 +7,28 @@ services:
7
7
container_name : devstore-rabbit
8
8
environment :
9
9
RABBITMQ_DEFAULT_USER : " devstore"
10
- RABBITMQ_DEFAULT_PASS : " devstore"
10
+ RABBITMQ_DEFAULT_PASS : " devstore"
11
11
12
- sql-server :
13
- image : desenvolvedorio/devstore-sql-server:latest
14
- container_name : devstore-sql-server
15
- environment :
16
- SA_PASSWORD : " MyDB@123"
17
- ACCEPT_EULA : " Y"
12
+ generate-pfx :
13
+ image : emberstack/openssl
14
+ container_name : generate-pfx
15
+ volumes :
16
+ - ./certs:/https:rw
17
+ command : >
18
+ sh -c "[ -e "./https/devstore.academy-localhost.pfx" ] && echo File Already exist || (
19
+ rm /https/devstore.academy-localhost.pfx &&
20
+ openssl genrsa -out devstore.rsa 2048 &&
21
+ openssl req -sha256 -new -key devstore.rsa -out devstore.csr -subj '/CN=localhost' &&
22
+ openssl x509 -req -sha256 -days 365 -in devstore.csr -signkey devstore.rsa -out devstore.crt &&
23
+ openssl pkcs12 -export -out /https/devstore.academy-localhost.pfx -inkey devstore.rsa -in devstore.crt -password pass:9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe &&
24
+ rm devstore.rsa devstore.csr devstore.crt)"
18
25
19
26
web-mvc :
20
27
image : desenvolvedorio/devstore-web-mvc-ecommerce:latest
21
28
container_name : devstore-web-mvc-ecommerce
22
29
restart : always
23
30
environment :
24
- - ASPNETCORE_ENVIRONMENT=Production
31
+ - ASPNETCORE_ENVIRONMENT=Docker
25
32
- ASPNETCORE_URLS=http://*:5001
26
33
- LC_ALL=en_US.UTF-8
27
34
- LANG=en_US.UTF-8
@@ -33,78 +40,127 @@ services:
33
40
- api-identity
34
41
- api-customers
35
42
- api-bff-checkout
43
+ - generate-pfx
44
+
45
+ database-identity :
46
+ image : mcr.microsoft.com/mssql/server:2017-latest
47
+ container_name : devstore-database-identity
48
+ expose :
49
+ - 1433
50
+ environment :
51
+ SA_PASSWORD : " MyDB@123"
52
+ ACCEPT_EULA : " Y"
36
53
37
54
api-identity :
38
55
image : desenvolvedorio/devstore-api-identity:latest
39
56
container_name : devstore-api-identity
40
57
restart : always
41
58
environment :
42
- - ASPNETCORE_ENVIRONMENT=Production
43
- - ASPNETCORE_URLS=https://+:5101;http://+5102
44
- - ASPNETCORE_Kestrel__Certificates__Default__Password=nerdstore
45
- - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/nerdstore-certificate.pfx
59
+ ASPNETCORE_ENVIRONMENT : Docker
60
+ ASPNETCORE_URLS : https://+:5101;http://+5102
61
+ ASPNETCORE_Kestrel__Certificates__Default__Password : 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe
62
+ ASPNETCORE_Kestrel__Certificates__Default__Path : /https/devstore.academy-localhost.pfx
63
+ CUSTOMCONNSTR_DefaultConnection : " Server=database-identity;Database=DSUsers;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
64
+ AppSettings__DatabaseType : SqlServer
46
65
volumes :
47
66
- ./certs:/https:ro
48
67
depends_on :
49
68
- rabbitmq
50
- - sql-server
69
+ - database-identity
70
+ - generate-pfx
71
+
72
+ database-cart :
73
+ image : mcr.microsoft.com/mssql/server:2017-latest
74
+ container_name : devstore-database-cart
75
+ expose :
76
+ - 1433
77
+ environment :
78
+ SA_PASSWORD : " MyDB@123"
79
+ ACCEPT_EULA : " Y"
51
80
52
81
api-cart :
53
82
image : desenvolvedorio/devstore-api-cart:latest
54
83
container_name : devstore-api-cart
55
84
restart : always
56
85
environment :
57
- - ASPNETCORE_ENVIRONMENT=Production
58
- - ASPNETCORE_URLS=https://+:5201;http://+5202
59
- - ASPNETCORE_Kestrel__Certificates__Default__Password=nerdstore
60
- - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/nerdstore-certificate.pfx
86
+ ASPNETCORE_ENVIRONMENT : Docker
87
+ ASPNETCORE_URLS : https://+:5201;http://+5202
88
+ ASPNETCORE_Kestrel__Certificates__Default__Password : 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe
89
+ ASPNETCORE_Kestrel__Certificates__Default__Path : /https/devstore.academy-localhost.pfx
90
+ CUSTOMCONNSTR_DefaultConnection : " Server=database-cart;Database=DSShoppingCart;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
91
+ AppSettings__DatabaseType : SqlServer
61
92
volumes :
62
93
- ./certs:/https:ro
63
94
depends_on :
64
95
- rabbitmq
65
96
- api-identity
66
- - sql-server
97
+ - database-cart
98
+ - generate-pfx
99
+
100
+ database-catalog :
101
+ image : mcr.microsoft.com/mssql/server:2017-latest
102
+ container_name : devstore-database-catalog
103
+ expose :
104
+ - 1433
105
+ environment :
106
+ SA_PASSWORD : " MyDB@123"
107
+ ACCEPT_EULA : " Y"
67
108
68
109
api-catalog :
69
110
image : desenvolvedorio/devstore-api-catalog:latest
70
111
container_name : devstore-api-catalog
71
112
restart : always
72
113
environment :
73
- - ASPNETCORE_ENVIRONMENT=Production
74
- - ASPNETCORE_URLS=https://+:5301;http://+5302
75
- - ASPNETCORE_Kestrel__Certificates__Default__Password=nerdstore
76
- - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/nerdstore-certificate.pfx
114
+ ASPNETCORE_ENVIRONMENT : Docker
115
+ ASPNETCORE_URLS : https://+:5301;http://+5302
116
+ ASPNETCORE_Kestrel__Certificates__Default__Password : 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe
117
+ ASPNETCORE_Kestrel__Certificates__Default__Path : /https/devstore.academy-localhost.pfx
118
+ CUSTOMCONNSTR_DefaultConnection : " Server=database-catalog;Database=DSCatalog;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
119
+ AppSettings__DatabaseType : SqlServer
77
120
volumes :
78
121
- ./certs:/https:ro
79
122
depends_on :
80
123
- rabbitmq
81
- - sql-server
124
+ - database-catalog
125
+ - generate-pfx
126
+
127
+ database-customers :
128
+ image : mcr.microsoft.com/mssql/server:2017-latest
129
+ container_name : devstore-database-customers
130
+ expose :
131
+ - 1433
132
+ environment :
133
+ SA_PASSWORD : " MyDB@123"
134
+ ACCEPT_EULA : " Y"
82
135
83
136
api-customers :
84
137
image : desenvolvedorio/devstore-api-customers:latest
85
138
container_name : devstore-api-customers
86
139
restart : always
87
140
environment :
88
- - ASPNETCORE_ENVIRONMENT=Production
89
- - ASPNETCORE_URLS=https://+:5401;http://+5402
90
- - ASPNETCORE_Kestrel__Certificates__Default__Password=nerdstore
91
- - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/nerdstore-certificate.pfx
141
+ ASPNETCORE_ENVIRONMENT : Docker
142
+ ASPNETCORE_URLS : https://+:5401;http://+5402
143
+ ASPNETCORE_Kestrel__Certificates__Default__Password : 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe
144
+ ASPNETCORE_Kestrel__Certificates__Default__Path : /https/devstore.academy-localhost.pfx
145
+ CUSTOMCONNSTR_DefaultConnection : " Server=database-customers;Database=DSCustomers;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
146
+ AppSettings__DatabaseType : SqlServer
92
147
volumes :
93
148
- ./certs:/https:ro
94
149
depends_on :
95
150
- rabbitmq
96
151
- api-identity
97
- - sql-server
152
+ - database-customers
153
+ - generate-pfx
98
154
99
155
api-bff-checkout :
100
156
image : desenvolvedorio/devstore-api-bff-checkout:latest
101
157
container_name : devstore-api-bff-checkout
102
158
restart : always
103
159
environment :
104
- - ASPNETCORE_ENVIRONMENT=Production
105
- - ASPNETCORE_URLS= https://+:5501;http://+5502
106
- - ASPNETCORE_Kestrel__Certificates__Default__Password=nerdstore
107
- - ASPNETCORE_Kestrel__Certificates__Default__Path= /https/nerdstore-certificate .pfx
160
+ ASPNETCORE_ENVIRONMENT : Docker
161
+ ASPNETCORE_URLS : https://+:5501;http://+5502
162
+ ASPNETCORE_Kestrel__Certificates__Default__Password : 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe
163
+ ASPNETCORE_Kestrel__Certificates__Default__Path : /https/devstore.academy-localhost .pfx
108
164
volumes :
109
165
- ./certs:/https:ro
110
166
depends_on :
@@ -113,47 +169,72 @@ services:
113
169
- api-cart
114
170
- api-billing
115
171
- api-order
172
+ - generate-pfx
173
+
174
+ database-billing :
175
+ image : mcr.microsoft.com/mssql/server:2017-latest
176
+ container_name : devstore-database-billing
177
+ expose :
178
+ - 1433
179
+ environment :
180
+ SA_PASSWORD : " MyDB@123"
181
+ ACCEPT_EULA : " Y"
116
182
117
183
api-billing :
118
184
image : desenvolvedorio/devstore-api-billing:latest
119
185
container_name : devstore-api-billing
120
186
restart : always
121
187
environment :
122
- - ASPNETCORE_ENVIRONMENT=Production
123
- - ASPNETCORE_URLS=https://+:5601;http://+5602
124
- - ASPNETCORE_Kestrel__Certificates__Default__Password=nerdstore
125
- - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/nerdstore-certificate.pfx
188
+ ASPNETCORE_ENVIRONMENT : Docker
189
+ ASPNETCORE_URLS : https://+:5601;http://+5602
190
+ ASPNETCORE_Kestrel__Certificates__Default__Password : 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe
191
+ ASPNETCORE_Kestrel__Certificates__Default__Path : /https/devstore.academy-localhost.pfx
192
+ CUSTOMCONNSTR_DefaultConnection : " Server=database-billing;Database=DSBilling;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
193
+ AppSettings__DatabaseType : SqlServer
126
194
volumes :
127
195
- ./certs:/https:ro
128
196
depends_on :
129
197
- rabbitmq
130
198
- api-identity
131
199
- api-order
132
- - sql-server
200
+ - database-billing
201
+ - generate-pfx
202
+
203
+ database-order :
204
+ image : mcr.microsoft.com/mssql/server:2017-latest
205
+ container_name : devstore-database-order
206
+ expose :
207
+ - 1433
208
+ environment :
209
+ SA_PASSWORD : " MyDB@123"
210
+ ACCEPT_EULA : " Y"
133
211
134
212
api-order :
135
213
image : desenvolvedorio/devstore-api-order:latest
136
214
container_name : devstore-api-order
137
215
restart : always
138
216
environment :
139
- - ASPNETCORE_ENVIRONMENT=Production
140
- - ASPNETCORE_URLS=https://+:5701;http://+5702
141
- - ASPNETCORE_Kestrel__Certificates__Default__Password=nerdstore
142
- - ASPNETCORE_Kestrel__Certificates__Default__Path=/https/nerdstore-certificate.pfx
217
+ ASPNETCORE_ENVIRONMENT : Docker
218
+ ASPNETCORE_URLS : https://+:5701;http://+5702
219
+ ASPNETCORE_Kestrel__Certificates__Default__Password : 9HoGMnb7Lu8NFdHBz4Vq2rtKivzMhmMXhtvuB4TZcLMmbWfFmDQCjJeLURAJ4GYe
220
+ ASPNETCORE_Kestrel__Certificates__Default__Path : /https/devstore.academy-localhost.pfx
221
+ CUSTOMCONNSTR_DefaultConnection : " Server=database-order;Database=DSOrders;MultipleActiveResultSets=true;User Id=sa;Password=MyDB@123"
222
+ AppSettings__DatabaseType : SqlServer
143
223
volumes :
144
224
- ./certs:/https:ro
145
225
depends_on :
146
226
- rabbitmq
147
- - sql-server
148
- - api-identity
227
+ - database-order
228
+ - api-identity
229
+ - generate-pfx
149
230
150
231
devstore-server :
151
232
image : desenvolvedorio/devstore-server:latest
152
233
container_name : devstore-server
153
234
restart : always
154
235
ports :
155
- - " 80 :80"
156
- - " 443 :443"
236
+ - " 7500 :80"
237
+ - " 7501 :443"
157
238
depends_on :
158
239
- web-mvc
159
240
0 commit comments