File tree Expand file tree Collapse file tree 4 files changed +51
-8
lines changed
Expand file tree Collapse file tree 4 files changed +51
-8
lines changed Original file line number Diff line number Diff line change 11FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
2- WORKDIR /app
2+ WORKDIR /src
33
4- COPY * .csproj ./
4+ COPY kommande-access-backend .csproj ./
55RUN dotnet restore
66
7- COPY . .
8- RUN dotnet publish -c Release -o /out
7+ COPY . ./
8+ RUN dotnet publish -c Release -o /app
99
10- FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
10+ FROM mcr.microsoft.com/dotnet/aspnet:8.0
1111WORKDIR /app
12- COPY --from=build /out .
1312
14- EXPOSE 5031
13+ COPY --from=build /app .
14+ COPY products.db /app/products.db
15+
16+ EXPOSE 5000
1517
16- ENTRYPOINT ["dotnet " , "kommande-access-backend.dll" ]
18+ CMD ["bash " , "-c" , "dotnet kommande-access-backend.dll && dotnet ef database update " ]
Original file line number Diff line number Diff line change 1+ FROM node:18 AS builder
2+
3+ WORKDIR /app
4+
5+ COPY package.json yarn.lock ./
6+ RUN yarn install
7+
8+ COPY . .
9+ RUN yarn build
10+
11+ FROM node:18-alpine AS runner
12+
13+ WORKDIR /app
14+
15+ COPY --from=builder /app/node_modules ./node_modules
16+ COPY --from=builder /app/.next ./.next
17+ COPY --from=builder /app/public ./public
18+ COPY --from=builder /app/package.json ./
19+
20+ EXPOSE 3000
21+
22+ CMD ["yarn" , "start" ]
Original file line number Diff line number Diff line change 1+ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
2+
3+ WORKDIR /src
4+
5+ COPY kommande-auth-backend.csproj ./
6+ RUN dotnet restore
7+
8+ COPY . ./
9+ RUN dotnet publish -c Release -o /app
10+
11+ FROM mcr.microsoft.com/dotnet/aspnet:8.0
12+
13+ WORKDIR /app
14+
15+ COPY --from=build /app .
16+
17+ EXPOSE 5001
18+
19+ CMD ["dotnet" , "kommande-auth-backend.dll" ]
You can’t perform that action at this time.
0 commit comments