Files
FrontOffice/src/FrontOffice.Main/Dockerfile
T
masoodafar-web 764742dbe7
Build and Deploy to Production / build-and-deploy (push) Failing after 1s
chore(infra): point staging registry to 185.252.31.44; keep prod K8S on 45.149.79.127
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-23 15:17:07 +03:30

31 lines
954 B
Docker

FROM 185.252.31.44:32082/dotnet/sdk:9.0 AS build
WORKDIR /src
# Copy NuGet config and project file
COPY ["FrontOffice.Main/NuGet.config", "NuGet.config"]
COPY ["FrontOffice.Main/FrontOffice.Main.csproj", "FrontOffice.Main/"]
# Restore dependencies
RUN dotnet restore "FrontOffice.Main/FrontOffice.Main.csproj" --configfile NuGet.config
# Copy all source code
COPY . .
# Build and publish
WORKDIR "/src/FrontOffice.Main"
RUN dotnet publish "FrontOffice.Main.csproj" -c Release -o /app/publish
# Runtime stage - aspnet for Blazor Server
FROM 185.252.31.44:32082/dotnet/aspnet:9.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
# Trust the staging-ca so server-side gRPC calls to https://cms.se.kbs1.ir succeed without PartialChain
COPY ["FrontOffice.Main/staging-ca.crt", "/usr/local/share/ca-certificates/staging-ca.crt"]
RUN update-ca-certificates
ENV ASPNETCORE_URLS=http://+:80
EXPOSE 80
ENTRYPOINT ["dotnet", "FrontOffice.Main.dll"]