4708b04482
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpTYCBLH58XzrM7n3xPJ5N
29 lines
1.1 KiB
Docker
29 lines
1.1 KiB
Docker
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
|
ARG BUILD_CONFIGURATION=Release
|
|
WORKDIR /src
|
|
COPY Directory.Packages.props ./
|
|
|
|
COPY web/web.csproj web/
|
|
RUN dotnet restore web/web.csproj
|
|
|
|
# Copy only the web project files to avoid bringing other projects into the build context
|
|
COPY web/ web/
|
|
RUN dotnet publish web/web.csproj -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
|
|
WORKDIR /app
|
|
EXPOSE 8080
|
|
ENV ASPNETCORE_URLS=http://0.0.0.0:8080
|
|
|
|
COPY --from=build /app/publish .
|
|
|
|
# Stamp the commit into the image so a deploy can be verified from the outside.
|
|
#
|
|
# Without this a smoke test can only ask "does the site return 200?" -- which it did
|
|
# throughout the month production was quietly serving staging images. A status check
|
|
# cannot tell one build from another; /version.json can, so the smoke job refuses to
|
|
# pass until the host is actually serving THIS commit.
|
|
# Deploy-timing probe 2026-08-24: first myAi deploy with the Watchtower trigger configured.
|
|
ARG GIT_SHA=unknown
|
|
RUN mkdir -p wwwroot && printf '{"version":"%s"}' "$GIT_SHA" > wwwroot/version.json
|
|
ENTRYPOINT ["dotnet", "web.dll"] |