Liam Pietralla
f577617b4d
All checks were successful
Build and Publish / Build Yale Access Backend (push) Successful in 28s
Build and Publish / Build Yale Access Frontend (push) Successful in 47s
Build and Publish / Push Yale Access Backend Docker Image (push) Successful in 9s
Build and Publish / Push Yale Access Frontend Docker Image (push) Successful in 10s
21 lines
606 B
Docker
21 lines
606 B
Docker
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
|
|
WORKDIR /app
|
|
EXPOSE 80
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
|
WORKDIR /src
|
|
COPY ["YaleAccess.csproj", "."]
|
|
RUN dotnet restore "./YaleAccess.csproj"
|
|
COPY . .
|
|
WORKDIR "/src/."
|
|
RUN dotnet build "YaleAccess.csproj" -c Release -o /app/build
|
|
|
|
FROM build AS publish
|
|
RUN dotnet publish "YaleAccess.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
|
|
|
FROM base AS final
|
|
RUN mkdir /yale-data
|
|
ENV ConnectionStrings__YaleContext="Data Source=/yale-data/yale-access.db"
|
|
WORKDIR /app
|
|
COPY --from=publish /app/publish .
|
|
ENTRYPOINT ["dotnet", "YaleAccess.dll"] |