- Capture the exact command, time, environment name, and final error without secrets.
- Confirm tool versions and current directory.
- Confirm authentication, subscription, region, and environment values.
- Check the narrow component: build, Bicep, migration job, Container App revision, database, Redis, Storage, or OpenAI.
- Apply one change and rerun the same failing check.
Never paste azd env get-values, connection strings, SAS URLs, tokens, or complete application data into a public issue.
Verify Node.js 22+ is installed and the shell PATH includes its bin directory:
command -v node
node --version
npm --versionRestart the terminal after installing Node. Avoid overwriting PATH with a project variable.
Check common ports:
lsof -nP -iTCP:3000 -sTCP:LISTEN
lsof -nP -iTCP:5432 -sTCP:LISTEN
lsof -nP -iTCP:6379 -sTCP:LISTENStop the conflicting process or change the local mapping. Do not run two platform copies against the same demo database unless intended.
docker compose ps
docker compose logs db
pg_isready -h localhost -p 5432If the schema changed while a stale volume remained, apply migrations. Delete volumes only when local data can be discarded:
docker compose down -v
docker compose up -d
npm run db:migrate:deploy
npm run db:seed:allRegenerate after dependency/schema changes:
npm run db:generate
npm run typecheckUse the same Node architecture/runtime as the current install. Containers generate the Linux client during image build.
Do not carry NODE_ENV=development into a production build:
NODE_ENV=production npm run buildThe Dockerfile sets NODE_ENV=production explicitly.
Run and inspect the container:
docker run --rm -p 3000:3000 --env-file .env digital-permit-web:local
curl -i http://localhost:3000/api/health
curl -i http://localhost:3000/api/health/ready/api/health checks process liveness. /api/health/ready requires a reachable database.
The worker requires REDIS_URL; some jobs also require database/storage settings. Inspect logs and verify the URL scheme/port. Azure Managed Redis must use rediss://.
Confirm both CLIs are installed and visible to the same shell:
azd version
az versionThe postdeploy hook also requires the Container Apps CLI commands. Update Azure CLI/extensions when az containerapp job commands are unavailable.
Create/select an environment through azd before running provisioning:
azd env new
azd env select
azd provisionAVM modules are fetched from the public Bicep registry. Check network/proxy access and retry:
az bicep restore --file infra/main.bicep --force
az bicep build --file infra/main.bicepDo not replace verified modules with copied generated ARM JSON.
The deploying principal needs permission for Microsoft.Authorization/roleAssignments/write. Assign User Access Administrator at the approved scope or use an organisation deployment identity with that permission.
Wait for managed-identity replication when an immediate role assignment intermittently reports the principal is not found, then rerun provisioning.
Read the deny assignment/policy details. Common conflicts include allowed regions, required tags, public network access, SKU restrictions, and diagnostic settings. Adapt the template to policy; do not bypass organisational policy for the sample.
Find the latest execution:
az containerapp job execution list \
--name "$(azd env get-value MIGRATIONS_JOB_NAME)" \
--resource-group "$(azd env get-value AZURE_RESOURCE_GROUP)" \
-o tableInspect job/system logs in the portal or Log Analytics. Common causes:
- Key Vault reference not resolved;
- PostgreSQL not ready or private DNS/network path missing;
- migration SQL incompatible with existing data;
- image deployment did not replace the placeholder;
- demo seeding lacks
DEMO_PASSWORDin production mode.
Do not repeatedly rerun a partially destructive migration until its database state is understood.
Check:
- PostgreSQL provisioning state;
- Container Apps VNet integration;
- PostgreSQL private DNS link;
database-urlKey Vault reference status;- web identity Key Vault Secrets User assignment;
- latest revision logs.
Azure Managed Redis uses an encrypted endpoint and the configured port, normally 10000 in this template. The URL must begin with rediss://. Ensure reserved characters in the password are URI-encoded; Bicep does this when creating the URL.
- confirm the worker has a ready replica;
- compare web and worker
REDIS_URLreferences; - inspect failed jobs and worker logs;
- verify queue names match producers/consumers;
- confirm the sample worker behavior is implemented for that job type.
Notification and malware-scanning jobs are placeholders; logging a simulated result is expected until those integrations are replaced.
Confirm the web identity has Storage Blob Data Contributor and the account name/container variables are correct. Storage shared-key access is disabled, so adding an account key is not the supported fix.
User-delegation SAS generation requires both Blob data access and Storage Blob Delegator. Check clock skew, role propagation, blob path, and SAS expiry. Never log the generated SAS URL.
Use:
AZURE_STORAGE_CONNECTION_STRING=UseDevelopmentStorage=trueConfirm the Azurite container is running and port 10000 is free.
AI controls are hidden or return 503
AZURE_OPENAI_ENDPOINT is empty when AI is disabled. Set ENABLE_AI=true and redeploy, or configure the local endpoint/deployment values.
In Azure, confirm the web identity has Cognitive Services OpenAI User on the account. Locally, run az login and assign the same data-plane role to your user.
Do not add an API key to work around a missing RBAC assignment in the supported Azure deployment.
Model versions, deployment types, and quota vary by region. Check the Foundry model catalog and subscription quota. Change AZURE_OPENAI_LOCATION, request quota, or deliberately update the Bicep model/version after compatibility evaluation.
The current analyser runs work in the web process. A restart can interrupt it. Retry the analysis and inspect web exceptions. For guaranteed production processing, move analysis to a durable queue/job.
- confirm the Key Vault reference resolved;
- confirm the web/worker revision has
APPLICATIONINSIGHTS_CONNECTION_STRINGas a secret reference; - generate traffic and wait for ingestion;
- check egress and public ingestion policy;
- inspect SDK initialization errors in console logs.
The included environment uses Log Analytics destination tables with _CL suffixes. Environments configured for Azure Monitor destination use different table names. Inspect workspace tables before reusing a query.
For reproducible sample defects, follow SUPPORT.md. For subscription incidents, billing, capacity, quota, or service health, use Azure support. Report vulnerabilities privately through SECURITY.md.