first pass

This commit is contained in:
2026-01-26 22:33:55 -06:00
commit fe66be4aad
37 changed files with 3127 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
# Stage 1: Build
FROM mcr.microsoft.com/dotnet/sdk:{{DOTNET_VERSION}} AS build
WORKDIR /src
# Copy project file and restore
COPY ["{{CSPROJ_FILE}}", "./"]
RUN dotnet restore "{{CSPROJ_FILE}}"
# Copy everything else and build
COPY . .
RUN dotnet build "{{CSPROJ_FILE}}" -c Release -o /app/build
RUN dotnet publish "{{CSPROJ_FILE}}" -c Release -o /app/publish
# Stage 2: Runtime
FROM mcr.microsoft.com/dotnet/aspnet:{{DOTNET_VERSION}}
WORKDIR /app
COPY --from=build /app/publish .
# Set environment
ENV ASPNETCORE_URLS=http://+:{{PORT}}
ENV ASPNETCORE_ENVIRONMENT=Production
EXPOSE {{PORT}}
ENTRYPOINT ["dotnet", "{{DLL_NAME}}"]