docker
This commit is contained in:
parent
d341e859dc
commit
88200aeca5
11
admin/Dockerfile
Normal file
11
admin/Dockerfile
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
FROM node:20-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN rm -f package-lock.json && npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
21
server/Dockerfile
Normal file
21
server/Dockerfile
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
FROM mcr.microsoft.com/dotnet/aspnet:10.0-preview AS base
|
||||
USER $APP_UID
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0-preview AS build
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
WORKDIR /src
|
||||
COPY ["CampusErrand.csproj", "."]
|
||||
RUN dotnet restore "./CampusErrand.csproj"
|
||||
COPY . .
|
||||
RUN dotnet build "./CampusErrand.csproj" -c $BUILD_CONFIGURATION -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
RUN dotnet publish "./CampusErrand.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "CampusErrand.dll"]
|
||||
Loading…
Reference in New Issue
Block a user