eef13d1471
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 4m15s
GW_URL/GwUrl env vars were baked into the Dockerfile (ENV) and the staging K8s manifest, overriding appsettings.*.json at runtime. This meant merging to production still used the staging CMS URL. Now only ASPNETCORE_ENVIRONMENT is set in the manifest; the correct GwUrl is read from appsettings.Staging.json or appsettings.Production.json depending on the environment — as intended. Co-authored-by: Cursor <cursoragent@cursor.com>
31 lines
952 B
Docker
31 lines
952 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 .
|
|
|
|
# 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"]
|