f4e24f7449
Build and Deploy to Production / build-and-deploy (push) Has been cancelled
- Add cms-config.yaml (K8s Secret) for staging and production
- Mount appsettings.{Environment}.json from Secret into /app/
- Update CI/CD pipelines to apply Secret before Deployment
- Remove redundant env vars (Kestrel, FileStorage) — now in config file
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
---
|
|
# CMS Application Configuration Secret (Production)
|
|
# This Secret stores appsettings.Production.json externally in K8s
|
|
# so configuration persists independently of Docker image rebuilds.
|
|
#
|
|
# To edit config without redeploying:
|
|
# kubectl edit secret cms-appsettings
|
|
# kubectl rollout restart deployment/cms
|
|
#
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: cms-appsettings
|
|
namespace: default
|
|
labels:
|
|
app: cms
|
|
environment: production
|
|
type: Opaque
|
|
stringData:
|
|
appsettings.Production.json: |
|
|
{
|
|
"ZarinPal": {
|
|
"MerchantId": "4225d555-5fa9-4df0-9b61-1ce152cbbba8",
|
|
"UseSandbox": false
|
|
},
|
|
"CmsBaseUrl": "https://cms.kbs1.ir",
|
|
"FrontOfficeBaseUrl": "https://kbs1.ir",
|
|
"ConnectionStrings": {
|
|
"DefaultConnection": "Server=mssql-svc;Database=KBS;User Id=sa;Password=YourStrong@Passw0rd;TrustServerCertificate=True;"
|
|
},
|
|
"SeedWorkers": {
|
|
"MagicWalletCycleSeed": {
|
|
"Enabled": true
|
|
}
|
|
},
|
|
"FileStorage": {
|
|
"UploadPath": "/app/Uploads"
|
|
},
|
|
"Kestrel": {
|
|
"EndpointDefaults": {
|
|
"Protocols": "Http2"
|
|
}
|
|
},
|
|
"Seq": {
|
|
"ServerUrl": "http://seq-svc:5341",
|
|
"ApiKey": "oxpvpUzU1pZxMS4s3Fqq"
|
|
},
|
|
"Logging": {
|
|
"LogLevel": {
|
|
"Default": "Warning",
|
|
"Microsoft.AspNetCore": "Warning"
|
|
}
|
|
}
|
|
}
|