Skip to content

Commit 375780e

Browse files
committed
2 parents 4110116 + b42fe35 commit 375780e

25 files changed

Lines changed: 164 additions & 65 deletions

File tree

docker-compose.ci.build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '2'
22

33
services:
44
ci-build:
5-
image: microsoft/aspnetcore-build:1.0-1.1
5+
image: microsoft/aspnetcore-build:1.1.2
66
volumes:
77
- .:/src
88
working_dir: /src

docker-compose.nobuild.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
version: '2'
2+
3+
services:
4+
basket.api:
5+
image: eshop/basket.api
6+
depends_on:
7+
- basket.data
8+
- identity.api
9+
- rabbitmq
10+
11+
catalog.api:
12+
image: eshop/catalog.api
13+
depends_on:
14+
- sql.data
15+
- rabbitmq
16+
17+
identity.api:
18+
image: eshop/identity.api
19+
depends_on:
20+
- sql.data
21+
22+
ordering.api:
23+
image: eshop/ordering.api
24+
depends_on:
25+
- sql.data
26+
27+
webspa:
28+
image: eshop/webspa
29+
depends_on:
30+
- identity.api
31+
- basket.api
32+
33+
webmvc:
34+
image: eshop/webmvc
35+
depends_on:
36+
- catalog.api
37+
- ordering.api
38+
- identity.api
39+
- basket.api
40+
41+
sql.data:
42+
image: microsoft/mssql-server-linux
43+
44+
basket.data:
45+
image: redis
46+
ports:
47+
- "6379:6379"
48+
49+
rabbitmq:
50+
image: rabbitmq
51+
ports:
52+
- "5672:5672"
53+
54+
webstatus:
55+
image: eshop/webstatus
56+

docker-compose.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services:
55
image: eshop/basket.api
66
build:
77
context: ./src/Services/Basket/Basket.API
8-
dockerfile: Dockerfile
8+
dockerfile: Dockerfile
99
depends_on:
1010
- basket.data
1111
- identity.api
@@ -15,7 +15,7 @@ services:
1515
image: eshop/catalog.api
1616
build:
1717
context: ./src/Services/Catalog/Catalog.API
18-
dockerfile: Dockerfile
18+
dockerfile: Dockerfile
1919
depends_on:
2020
- sql.data
2121
- rabbitmq
@@ -24,23 +24,23 @@ services:
2424
image: eshop/identity.api
2525
build:
2626
context: ./src/Services/Identity/Identity.API
27-
dockerfile: Dockerfile
27+
dockerfile: Dockerfile
2828
depends_on:
2929
- sql.data
3030

3131
ordering.api:
3232
image: eshop/ordering.api
3333
build:
3434
context: ./src/Services/Ordering/Ordering.API
35-
dockerfile: Dockerfile
35+
dockerfile: Dockerfile
3636
depends_on:
3737
- sql.data
3838

3939
webspa:
4040
image: eshop/webspa
4141
build:
4242
context: ./src/Web/WebSPA
43-
dockerfile: Dockerfile
43+
dockerfile: Dockerfile
4444
depends_on:
4545
- identity.api
4646
- basket.api
@@ -49,7 +49,7 @@ services:
4949
image: eshop/webmvc
5050
build:
5151
context: ./src/Web/WebMVC
52-
dockerfile: Dockerfile
52+
dockerfile: Dockerfile
5353
depends_on:
5454
- catalog.api
5555
- ordering.api
@@ -73,4 +73,5 @@ services:
7373
image: eshop/webstatus
7474
build:
7575
context: ./src/Web/WebStatus
76-
dockerfile: Dockerfile
76+
dockerfile: Dockerfile
77+

eShopOnContainers-ServicesAndWebApps.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26403.3
4+
VisualStudioVersion = 15.0.26430.12
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{932D8224-11F6-4D07-B109-DA28AD288A63}"
77
EndProject

src/BuildingBlocks/Resilience/Resilience.Http/ResilientHttpClient.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private Task<HttpResponseMessage> DoPostPutAsync<T>(HttpMethod method, string ur
9696
// as it is disposed after each call
9797
var origin = GetOriginFromUri(uri);
9898

99-
return HttpInvoker(origin, () =>
99+
return HttpInvoker(origin, async () =>
100100
{
101101
var requestMessage = new HttpRequestMessage(method, uri);
102102

@@ -112,7 +112,7 @@ private Task<HttpResponseMessage> DoPostPutAsync<T>(HttpMethod method, string ur
112112
requestMessage.Headers.Add("x-requestid", requestId);
113113
}
114114

115-
var response = _client.SendAsync(requestMessage).Result;
115+
var response = await _client.SendAsync(requestMessage);
116116

117117
// raise exception if HttpResponseCode 500
118118
// needed for circuit breaker to track fails
@@ -122,7 +122,7 @@ private Task<HttpResponseMessage> DoPostPutAsync<T>(HttpMethod method, string ur
122122
throw new HttpRequestException();
123123
}
124124

125-
return Task.FromResult(response);
125+
return response;
126126
});
127127
}
128128

@@ -132,13 +132,13 @@ private async Task<T> HttpInvoker<T>(string origin, Func<Task<T>> action)
132132

133133
if (!_policyWrappers.TryGetValue(normalizedOrigin, out PolicyWrap policyWrap))
134134
{
135-
policyWrap = Policy.Wrap(_policyCreator(normalizedOrigin).ToArray());
135+
policyWrap = Policy.WrapAsync(_policyCreator(normalizedOrigin).ToArray());
136136
_policyWrappers.TryAdd(normalizedOrigin, policyWrap);
137137
}
138138

139139
// Executes the action applying all
140140
// the policies defined in the wrapper
141-
return await policyWrap.Execute(action, new Context(normalizedOrigin));
141+
return await policyWrap.ExecuteAsync(action, new Context(normalizedOrigin));
142142
}
143143

144144

src/Mobile/eShopOnContainers/eShopOnContainers.Core/Services/Identity/IdentityService.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ public string CreateAuthorizationRequest()
1414
// Dictionary with values for the authorize request
1515
var dic = new Dictionary<string, string>();
1616
dic.Add("client_id", "xamarin");
17-
dic.Add("response_type", "id_token token");
18-
dic.Add("scope", "openid profile basket orders");
17+
dic.Add("client_secret", "secret");
18+
dic.Add("response_type", "code id_token token");
19+
dic.Add("scope", "openid profile basket orders offline_access");
1920

2021
dic.Add("redirect_uri", GlobalSetting.Instance.IdentityCallback);
2122
dic.Add("nonce", Guid.NewGuid().ToString("N"));
@@ -24,7 +25,7 @@ public string CreateAuthorizationRequest()
2425
var currentCSRFToken = Guid.NewGuid().ToString("N");
2526
dic.Add("state", currentCSRFToken);
2627

27-
var authorizeUri = authorizeRequest.Create(dic);
28+
var authorizeUri = authorizeRequest.Create(dic);
2829
return authorizeUri;
2930
}
3031

src/Services/Basket/Basket.API/Basket.API.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp1.1</TargetFramework>
5+
<RuntimeFrameworkVersion>1.1.2</RuntimeFrameworkVersion>
56
<OutputType>Exe</OutputType>
67
<PackageTargetFallback>$(PackageTargetFallback);netstandard1.6.1;dnxcore50;portable-net451+win8</PackageTargetFallback>
78
<DockerComposeProjectPath>..\..\..\..\docker-compose.dcproj</DockerComposeProjectPath>

src/Services/Basket/Basket.API/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/aspnetcore:1.1
1+
FROM microsoft/aspnetcore:1.1.2
22
ARG source
33
WORKDIR /app
44
EXPOSE 80

src/Services/Catalog/Catalog.API/Catalog.API.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<TargetFramework>netcoreapp1.1</TargetFramework>
5+
<RuntimeFrameworkVersion>1.1.2</RuntimeFrameworkVersion>
56
<OutputType>Exe</OutputType>
67
<UserSecretsId>aspnet-Catalog.API-20161122013618</UserSecretsId>
78
<PackageTargetFallback>$(PackageTargetFallback);dotnet5.6;portable-net45+win8</PackageTargetFallback>
@@ -44,6 +45,7 @@
4445
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="1.1.2" />
4546
<PackageReference Include="Newtonsoft.Json" Version="10.0.2" />
4647
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0" />
48+
<PackageReference Include="Polly" Version="5.1.0" />
4749
</ItemGroup>
4850

4951
<ItemGroup>

src/Services/Catalog/Catalog.API/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM microsoft/aspnetcore:1.1
1+
FROM microsoft/aspnetcore:1.1.2
22
ARG source
33
WORKDIR /app
44
EXPOSE 80

0 commit comments

Comments
 (0)