Changed the imagePullPolicy for the frontoffice container to Always to ensure that the latest image is always pulled from the registry during deployment, improving the consistency of the application updates. Additionally, added a cleanup step in the kub-deploy workflow to remove the latest image from the local cache after deployment.
Updated the imagePullPolicy for the frontoffice container to IfNotPresent to optimize image pulling behavior, ensuring that images are only pulled when not already present on the node.
Both kub-deploy and prod-deploy were only running kubectl rollout restart,
meaning changes to the deployment manifest (env vars, resources, image tag)
were never applied to the cluster.
- Add scp + kubectl apply before rollout restart in kub-deploy.yml (staging)
- Add scp + kubectl apply before rollout restart in prod-deploy.yml (production)
- Add k8s/production/frontoffice-deployment.yaml with ASPNETCORE_ENVIRONMENT=Production
and image tag :prod
Co-authored-by: Cursor <cursoragent@cursor.com>
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>
Add staging-ca.crt to the Dockerfile so the ASP.NET runtime inside the
container trusts the internal staging CA. This fixes server-side gRPC
calls from FrontOffice (Blazor Server) to https://cms.se.kbs1.ir which
were failing with PartialChain because the container CA store did not
include the staging root certificate.
Also adds GW_URL env support alongside GwUrl for parity with BackOffice.
Co-authored-by: Cursor <cursoragent@cursor.com>
- 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.
- Added GW_URL and GwUrl environment variables in frontoffice-deployment.yaml and Dockerfile for consistent gateway URL configuration.
- Updated AddGrpcServices method to resolve gateway URL from both environment variables, ensuring proper error handling for missing values.
- Modified TokenNotificationService to prioritize GW_URL over GwUrl for improved configuration flexibility.
- Removed CmsServerBaseUrl utility class and updated references to directly access GwUrl from configuration.
- Adjusted frontoffice-deployment.yaml to remove CmsInternalBaseUrl environment variable.
- Updated appsettings for staging and main environments to reflect the correct CMS service URLs.
- Ensured consistent handling of GwUrl in TokenNotificationService and AddGrpcServices methods.
- Replace direct access to configuration for GwUrl with CmsServerBaseUrl.Resolve in AddGrpcServices and TokenNotificationService.
- Ensure proper error handling for missing GwUrl and add support for optional bypass of public TLS using CmsInternalBaseUrl.
- Adjust channel credentials based on whether the base URL is HTTPS or not.