Deployment
Overview
Section titled “Overview”Formation is deployed to Azure Container Apps using Bicep for infrastructure-as-code and GitHub Actions for CI/CD.
Architecture
Section titled “Architecture”graph TD subgraph Azure subgraph "Container Apps Environment" INGRS[Nginx Ingress] API[API Container] WEB[Web Container] DOCS[Docs Container] end ACR[Container Registry] SQL[(Azure SQL)] KV[Key Vault] BLOB[(Blob Storage)] AI[Application Insights] end
ACR --> INGRS ACR --> API ACR --> WEB ACR --> DOCS INGRS --> WEB INGRS --> API API --> SQL API --> KV DOCS --> BLOB API --> AI WEB --> AIEnvironments
Section titled “Environments”| Environment | Domain | Resource Group |
|---|---|---|
| Dev | formdev.pma.co.uk | frmpmauks-dev-rg-01 |
| UAT | formuat.pma.co.uk | frmpmauks-uat-rg-01 |
| Prod | form.pma.co.uk | frmpmauks-prod-rg-01 |
Deploying Infrastructure
Section titled “Deploying Infrastructure”# From infrastructure/deploy/./new-deployment.ps1 -environment devThis deploys all Bicep modules including:
- Virtual network and subnets
- SQL Server and database
- Key Vault and secrets
- Container Apps environment
- Container Apps (API, Web, Ingress, Docs)
- Storage accounts
- Application Insights
CI/CD Pipelines
Section titled “CI/CD Pipelines”Each service has separate validate (PR) and deploy (main) workflows:
| Service | Validate | Deploy |
|---|---|---|
| API | dotnet-service-validate.yml | dotnet-service-deploy.yml |
| Web | web-service-validate.yml | web-service-deploy.yml |
| Docs | docs-service-validate.yml | docs-service-deploy.yml |
| SQL | sql-validate.yml | sql-deploy.yml |
| Ingress | ingress-validate.yml | ingress-deploy.yml |
| Infra | infrastructure-validate.yml | infrastructure-deploy.yml |
Container Images
Section titled “Container Images”All images are pushed to the shared ACR: frmpmaukscommonacr01.azurecr.io
| Image | Source |
|---|---|
app.api | src/services/api/app/app.api/ |
app.web | src/services/web/ |
app.docs | src/services/docs/ |
app.ingrs | src/services/ingrs/ |
job.load | src/services/job/load/ |