File tree Expand file tree Collapse file tree 2 files changed +24
-7
lines changed
Expand file tree Collapse file tree 2 files changed +24
-7
lines changed Original file line number Diff line number Diff line change 1- # build container
2- FROM node:7
1+ # Api Container
32FROM microsoft/dotnet:2.2-sdk AS build
43WORKDIR /build
5-
6- # copy everything
74COPY . .
85
96# install dotnet cake tool
107RUN dotnet tool install -g Cake.Tool
118ENV PATH="${PATH}:/root/.dotnet/tools"
129
1310# build, restore and test
14- RUN dotnet cake build.cake
11+ RUN dotnet cake build.cake --task="Api Publish"
12+
13+ # ##################################################
14+
15+ # Vue container
16+ FROM node:8 AS client
17+ WORKDIR /client
18+ COPY . .
19+
20+ RUN npm install --prefix ./src/Client/
1521
16- # runtime container
22+ RUN npm run build --prefix ./src/Client/
23+
24+ # ##################################################
25+
26+ # Runtime Container
1727FROM microsoft/dotnet:2.2-aspnetcore-runtime AS runtime
28+ WORKDIR /app
1829
1930COPY --from=build /build/dist /app
31+ COPY --from=client /client/src/Client/dist /app/wwwroot
32+
2033WORKDIR /app
2134
2235EXPOSE 5000
2336
2437RUN dotnet --list-runtimes
25- ENTRYPOINT ["dotnet" , "Safe.Api .dll" ]
38+ ENTRYPOINT ["dotnet" , "WebApi .dll" ]
Original file line number Diff line number Diff line change @@ -83,4 +83,8 @@ Task("Publish")
8383 . IsDependentOn ( "Publish Client" )
8484 . IsDependentOn ( "Copy Published client into /wwwroot" ) ;
8585
86+ Task ( "Api Publish" )
87+ . IsDependentOn ( "Build project" )
88+ . IsDependentOn ( "Publish Api project" ) ;
89+
8690RunTarget ( task ) ;
You can’t perform that action at this time.
0 commit comments