Architecture
Diagram
Developer
│
├── Local dev ──▶ docker compose up ──▶ Quote API (port 8000)
│
└── Azure deploy ──▶ ACR (build image) ──▶ Container Apps (run API)
│
└── ACR Tasks (build, lint, push on trigger)Flow:
- Code is built into a Docker image
- Image is stored in Azure Container Registry
- Azure Container Apps pulls the image and runs the API
- ACR Tasks automate build → lint → push (see
acr-task.yaml)
Folder structure
Diagram
quote-api/
├── app/
│ ├── __init__.py
│ ├── main.py # FastAPI app entry point
│ ├── config.py # Environment settings
│ ├── models.py # Domain models
│ ├── schemas.py # Request/response schemas
│ ├── database.py # In-memory quote store
│ ├── routes/
│ │ └── quotes.py # API endpoints
│ └── services/
│ └── quote_service.py # Business logic
├── deploy.sh # Azure deployment (Linux/macOS)
├── deploy.ps1 # Azure deployment (Windows)
├── acr-task.yaml # Multi-step ACR build pipeline
├── Dockerfile # Production container image
├── docker-compose.yml # Local development
├── requirements.txt
├── .env.example # Environment variable template
└── .gitignoreShort notes
deploy.ps1/deploy.sh— end-to-end Azure provision + deployacr-task.yaml— multi-step ACR Task (lint + build + push)- App listens on 8000 (matches Container Apps
--target-port)