File tree 5 files changed +72
-8
lines changed
5 files changed +72
-8
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ version: "3.2"
2
2
3
3
services :
4
4
vote :
5
+ image : dockersamples/examplevotingapp_vote:dotnet-nanoserver-sac2016
5
6
build :
6
7
context : ./vote/dotnet
7
8
ports :
@@ -10,20 +11,22 @@ services:
10
11
- message-queue
11
12
12
13
result :
14
+ image : dockersamples/examplevotingapp_result:dotnet-nanoserver-sac2016
13
15
build :
14
16
context : ./result/dotnet
15
17
ports :
16
18
- " 5001:80"
17
19
environment :
18
- - " Data:ConnectionString =Server=db;Port=4000;Database=votes;User=root;SslMode=None"
20
+ - " ConnectionStrings:ResultData =Server=db;Port=4000;Database=votes;User=root;SslMode=None"
19
21
depends_on :
20
22
- db
21
23
22
24
worker :
25
+ image : dockersamples/examplevotingapp_worker:dotnet-nanoserver-sac2016
23
26
build :
24
27
context : ./worker/dotnet
25
28
environment :
26
- - " Data:ConnectionString =Server=db;Port=4000;Database=votes;User=root;SslMode=None"
29
+ - " ConnectionStrings:VoteData =Server=db;Port=4000;Database=votes;User=root;SslMode=None"
27
30
depends_on :
28
31
- message-queue
29
32
- db
Original file line number Diff line number Diff line change
1
+ version : " 3.2"
2
+
3
+ services :
4
+ vote :
5
+ image : dockersamples/examplevotingapp_vote:dotnet-nanoserver-sac2016
6
+ ports :
7
+ - mode : host
8
+ target : 80
9
+ published : 5000
10
+ deploy :
11
+ endpoint_mode : dnsrr
12
+ networks :
13
+ - frontend
14
+ - backend
15
+
16
+ result :
17
+ image : dockersamples/examplevotingapp_result:dotnet-nanoserver-sac2016
18
+ environment :
19
+ - " ConnectionStrings:ResultData=Server=db;Port=4000;Database=votes;User=root;SslMode=None"
20
+ ports :
21
+ - mode : host
22
+ target : 80
23
+ published : 5001
24
+ deploy :
25
+ endpoint_mode : dnsrr
26
+ networks :
27
+ - frontend
28
+ - backend
29
+
30
+ worker :
31
+ image : dockersamples/examplevotingapp_worker:dotnet-nanoserver-sac2016
32
+ environment :
33
+ - " ConnectionStrings:VoteData=Server=db;Port=4000;Database=votes;User=root;SslMode=None"
34
+ deploy :
35
+ endpoint_mode : dnsrr
36
+ mode : replicated
37
+ replicas : 3
38
+ networks :
39
+ - backend
40
+
41
+ message-queue :
42
+ image : nats:nanoserver
43
+ deploy :
44
+ endpoint_mode : dnsrr
45
+ networks :
46
+ - backend
47
+
48
+ db :
49
+ image : dockersamples/tidb:nanoserver
50
+ ports :
51
+ - mode : host
52
+ target : 4000
53
+ published : 3306
54
+ deploy :
55
+ endpoint_mode : dnsrr
56
+ networks :
57
+ - backend
58
+
59
+ networks :
60
+ frontend :
61
+ backend:
Original file line number Diff line number Diff line change 1
- FROM microsoft/dotnet:2.1-sdk as builder
1
+ FROM microsoft/dotnet:2.1-sdk-nanoserver-sac2016 as builder
2
2
3
3
WORKDIR /Result
4
4
COPY Result/Result.csproj .
@@ -8,7 +8,7 @@ COPY /Result .
8
8
RUN dotnet publish -c Release -o /out Result.csproj
9
9
10
10
# app image
11
- FROM microsoft/dotnet:2.1-aspnetcore-runtime
11
+ FROM microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-sac2016
12
12
13
13
WORKDIR /app
14
14
ENTRYPOINT ["dotnet" , "Result.dll" ]
Original file line number Diff line number Diff line change 1
- FROM microsoft/dotnet:2.1-sdk as builder
1
+ FROM microsoft/dotnet:2.1-sdk-nanoserver-sac2016 as builder
2
2
3
3
WORKDIR /Vote
4
4
COPY Vote/Vote.csproj .
@@ -8,7 +8,7 @@ COPY /Vote .
8
8
RUN dotnet publish -c Release -o /out Vote.csproj
9
9
10
10
# app image
11
- FROM microsoft/dotnet:2.1-aspnetcore-runtime
11
+ FROM microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-sac2016
12
12
13
13
WORKDIR /app
14
14
ENTRYPOINT ["dotnet" , "Vote.dll" ]
Original file line number Diff line number Diff line change 1
- FROM microsoft/dotnet:2.1-sdk as builder
1
+ FROM microsoft/dotnet:2.1-sdk-nanoserver-sac2016 as builder
2
2
3
3
WORKDIR /Worker
4
4
COPY Worker/Worker.csproj .
@@ -8,7 +8,7 @@ COPY /Worker .
8
8
RUN dotnet publish -c Release -o /out Worker.csproj
9
9
10
10
# app image
11
- FROM microsoft/dotnet:2.1-runtime
11
+ FROM microsoft/dotnet:2.1-runtime-nanoserver-sac2016
12
12
13
13
WORKDIR /app
14
14
ENTRYPOINT ["dotnet" , "Worker.dll" ]
You can’t perform that action at this time.
0 commit comments