You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deployment flow: The deploy script creates Storage first, then ACR, builds and pushes the container image, creates a Container Apps managed environment, and finally creates a container app that pulls from ACR. The storage connection string is stored as a Container Apps secret and injected into the container through a secretref environment variable.
At runtime: The Flask app reads the storage connection string from its environment, connects to Blob Storage, and provides a web UI for signing and reading the guestbook. The revision that served each response is shown in the UI, so rolling out a new revision with az containerapp update is observable over HTTP.
# Start the LocalStack Azure emulator
IMAGE_NAME=localstack/localstack-azure localstack start -d
localstack wait -t 60
# Route all Azure CLI calls to the LocalStack Azure emulator
lstk az start-interception
# Deploy all servicescd samples/container-apps-blob-storage/python
bash scripts/deploy.sh
# Validate the deployment (includes a live HTTP round trip and a revision rollout)
bash scripts/validate.sh
Alternative Deployments
Bicep
cd samples/container-apps-blob-storage/python
bash bicep/deploy.sh
Terraform
cd samples/container-apps-blob-storage/python
bash terraform/deploy.sh
Cleanup
# Removes all resources created by deploy.sh
bash scripts/cleanup.sh
Application
The Guestbook is a Flask web application that lets visitors sign a guestbook. Entries are stored as a single JSON blob in Azure Blob Storage, so they survive replica restarts and revision switches.
Endpoints
Route
Method
Description
/
GET
View all guestbook entries
/
POST
Sign the guestbook
/delete/<id>
POST
Delete an entry
/health
GET
Health check (reports the serving revision)
Environment Variables
Variable
Description
AZURE_STORAGE_CONNECTION_STRING
Blob Storage connection string (injected via secretref:storage-conn)
BLOB_CONTAINER_NAME
Name of the blob container for entries
APP_REVISION
Revision label shown in the UI and /health (default: "v1")
Scripts
Script
Description
scripts/deploy.sh
Deploys Storage, ACR, the Container Apps environment, and the container app
scripts/validate.sh
Validates all resources, exercises secrets, revisions and replicas, and drives the live app over its ingress FQDN