Shared Azure infrastructure + individual container app deployments.
Co-authored with Claude Sonnet 4.6
infra/
shared/ # Shared Azure infrastructure (deploy once)
main.bicep # ACR, storage, CA environment, Log Analytics
main.bicepparam # Names and app file share list — edit here
bootstrap.sh # One-time: resource group + service principal
azure-pipelines.yml # Redeploys shared infra on infra/shared/** changes
screenshot-svc/ # App-level Bicep (one folder per app)
main.bicep # Container App referencing shared resources
apps/
screenshot-svc/ # App source code
src/
server.ts
Dockerfile
openapi.json
package.json
tsconfig.json
azure-pipelines.yml # Build image + deploy app on apps/screenshot-svc/** changes
az login
az account set --subscription "<your-subscription-id>"
chmod +x infra/shared/bootstrap.sh
./infra/shared/bootstrap.shFollow the printed instructions to create the ADO variable group and service connection.
- Add the app name to
appFileSharesininfra/shared/main.bicepparam - Redeploy shared infra (push the change — the shared pipeline picks it up)
- Create
infra/<app-name>/main.bicepreferencing shared resources - Create
apps/<app-name>/with source, Dockerfile, andazure-pipelines.yml - Register both pipelines in ADO and link the
container-apps-sharedvariable group
| Variable | Value |
|---|---|
AZURE_RESOURCE_GROUP |
rg-container-apps |
ACR_NAME |
rccontainerapps |
CA_ENV_NAME |
cae-shared |
STORAGE_ACCOUNT_NAME |
rccontainerappsstr |
| Pipeline | File | Triggers on |
|---|---|---|
| Shared Infra | infra/shared/azure-pipelines.yml |
infra/shared/** |
| screenshot-svc | apps/screenshot-svc/azure-pipelines.yml |
apps/screenshot-svc/** or infra/screenshot-svc/** |