From eef13d147102a3515fd620739d621d1455707638 Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Thu, 14 May 2026 01:35:18 +0330 Subject: [PATCH] fix: remove hardcoded GW_URL from Dockerfile and staging manifest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- k8s/staging/frontoffice-deployment.yaml | 4 ---- src/FrontOffice.Main/Dockerfile | 1 - 2 files changed, 5 deletions(-) diff --git a/k8s/staging/frontoffice-deployment.yaml b/k8s/staging/frontoffice-deployment.yaml index 88b5cf3..989e9a2 100644 --- a/k8s/staging/frontoffice-deployment.yaml +++ b/k8s/staging/frontoffice-deployment.yaml @@ -28,10 +28,6 @@ spec: env: - name: ASPNETCORE_ENVIRONMENT value: "Staging" - - name: GW_URL - value: "https://cms.se.kbs1.ir" - - name: GwUrl - value: "https://cms.se.kbs1.ir" resources: requests: memory: "256Mi" diff --git a/src/FrontOffice.Main/Dockerfile b/src/FrontOffice.Main/Dockerfile index 7773778..b7a1691 100644 --- a/src/FrontOffice.Main/Dockerfile +++ b/src/FrontOffice.Main/Dockerfile @@ -25,7 +25,6 @@ COPY ["FrontOffice.Main/staging-ca.crt", "/usr/local/share/ca-certificates/stagi RUN update-ca-certificates ENV ASPNETCORE_URLS=http://+:80 -ENV GW_URL=https://cms.se.kbs1.ir EXPOSE 80 ENTRYPOINT ["dotnet", "FrontOffice.Main.dll"]