Files
FrontOffice/src/FrontOffice.Main/Dockerfile
T
masoodafar-web 28a55246df
Build and Deploy to Kubernetes / build-and-deploy (push) Failing after 3m25s
chore: update gateway URL configuration for staging environment
- Changed GW_URL and GwUrl in frontoffice-deployment.yaml and Dockerfile to use the internal service URL http://cms-svc:8080 for the staging environment.
- Enhanced ConfigureServices to handle HTTP/1.1 for gRPC when using the internal service URL, ensuring compatibility with Kestrel's requirements.
2026-05-14 00:36:54 +03:30

30 lines
947 B
Docker

FROM 194.5.195.53: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 194.5.195.53:32082/dotnet/aspnet:9.0 AS runtime
WORKDIR /app
COPY --from=build /app/publish .
ENV ASPNETCORE_URLS=http://+:80
ENV GW_URL=https://cms.se.kbs1.ir
# For Kubernetes staging, override GW_URL/GwUrl to http://cms-svc:8080 via deployment env vars
# to avoid TLS PartialChain when the public ingress cert is not trusted by the container.
EXPOSE 80
ENTRYPOINT ["dotnet", "FrontOffice.Main.dll"]