File tree 5 files changed +6
-55
lines changed
5 files changed +6
-55
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33
33
@foreach ( var product in products )
34
34
{
35
35
<tr >
36
- <td ><img height =" 80" width =" 80" src =" @imagePrefix/@product.ImageUrl" /></td >
36
+ <!-- Simulating images being hosted on a CDN -->
37
+ <td ><img height =" 80" width =" 80" src =" https://raw.githubusercontent.com/MicrosoftDocs/mslearn-dotnet-cloudnative/main/dotnet-docker/Products/wwwroot/images/@product.ImageUrl" /></td >
37
38
<td >@product.Name </td >
38
39
<td >@product.Description </td >
39
40
<td >@product.Price </td >
45
46
46
47
@code {
47
48
private List <Product >? products ;
48
- private string imagePrefix = string .Empty ;
49
49
50
50
protected override async Task OnInitializedAsync ()
51
51
{
52
52
// Simulate asynchronous loading to demonstrate streaming rendering
53
- await Task .Delay (500 );
54
- imagePrefix = Configuration [" ImagePrefix" ];
55
53
products = await ProductService .GetProducts ();
56
54
}
57
55
Original file line number Diff line number Diff line change 8
8
},
9
9
"AllowedHosts" : " *" ,
10
10
"ProductEndpoint" : " http://localhost:5200" ,
11
- "ProductEndpointHttps" : " https://localhost:5200" ,
12
- "ImagePrefix" : " http://localhost:5200/images"
11
+ "ProductEndpointHttps" : " https://localhost:5200"
13
12
}
Original file line number Diff line number Diff line change @@ -3,21 +3,15 @@ version: '3.4'
3
3
services :
4
4
5
5
frontend :
6
- image : storeimage
7
- build :
8
- context : .
9
- dockerfile : DockerfileStore
6
+ image : store:latest
10
7
environment :
11
8
- ProductEndpoint=http://backend:8080
12
- - ImagePrefix=http://localhost
9
+ - ConnectionStrings:AppConfig=[PASTE CONNECTION STRING HERE]
13
10
ports :
14
11
- " 32000:8080"
15
12
depends_on :
16
13
- backend
17
14
backend :
18
- image : productservice
19
- build :
20
- context : .
21
- dockerfile : DockerfileProducts
15
+ image : products:latest
22
16
ports :
23
17
- " 32001:8080"
You can’t perform that action at this time.
0 commit comments