az containerapp compose https://learn.microsoft.com/en-us/cli/azure/containerapp/compose?view=azure-cli-latest
uv- Docker multi-stage builds
- Backend: FastAPI (shift to LangGraph Platform)
- Frontend: Next.js, React components, Tailwind CSS, TypeScript
- Azure Search DB
- Azure Registry
- Azure Container app
- Azure Redis
https://github.com/fastapi/full-stack-fastapi-template
Patch deployments for quick A/B test experiments
[project]
name = "my-project"
version = "0.1.0"
dependencies = [
"my-internal-package"
]
[tool.uv.sources]
my-internal-package = { git = "https://your-internal-repo.com/my-internal-package.git", branch = "development-branch" }uvworkspace - deployment is captured in one repo but you still play around with different service versions- Docker multi-stage builds (3x smaller images)
- Backend: FastAPI (shift to LangGraph Platform)
- async LLM calls
- sentence transformer to fine tune embedding models
- sklearn to create simple ML models to predict doc line relevance and user question topic
- Frontend: Next.js, React components, Tailwind CSS, TypeScript
- Search DB - sparse vector embedding search (coming soon)
- Azure registry and container app deployment -- I got funding from Microsoft
- Redis cache (coming soon)
- Transparency over automation
- no github actions until CI/CD is needed due to more team members going faster
- Simplicity - no Terraform - stick w/ Azure CLI until the infrastructure is more complex
- Build the images locally
- Push the images to cloud registry
- Deploy cloud container based on new image in registry
Source: Azure Container Registry for launch in Azure Container Apps.
Assumptions:
- Azure: Azure CLI installed and your logged into it
- you have created a resource group in Azure (e.g., for me its
nobsmed)
I prefix names with nobs because my company is called Nobsmed.
# create the registry
az acr create --resource-group nobsmed --name nobsregistry --sku Basic
# sanity check
az acr show --name nobsregistry --query loginServer --output table
Result
--------------------------
nobsmedregistry.azurecr.io# Build backend and frontend docker images:
docker build --tag nobs_backend --file docker/Dockerfile .
docker build --tag nobs_frontend --file docker/Dockerfile .
# Tag the images for Azure Container Registry
docker tag nobs_backend nobsregistry.azurecr.io/nobs_backend:v1
# Sanity check
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
nobsregistry.azurecr.io/nobs_backend v1 585a4696bedd 44 hours ago 197MB
nobs_backend latest 585a4696bedd 43 hours ago 197MB
nobs_frontend latest 585a4696bedd 43 hours ago 197MB
# Login to Azure Container Registry
az acr login --name nobsregistry
# Push image to Azure Container Registry
docker push nobsregistry.azurecr.io/nobs_backend:v1
**# Sanity check .....you see the output below**
The push refers to repository [nobsregistry.azurecr.io/nobs_backend]
5f70bf18a086: Preparing
7d577052c02c: Preparing
ac42807ce093: Preparing
d54c60f73cbb: Preparing
d559dc6e6c29: Preparing
8f697a207321: Waiting
# Sanity check that the image is in the registry
az acr repository list --name nobsregistry
[
"nobs_backend",
]source azure_env
source azure_deploy
az containerapp create \
--name $API_NAME \
--resource-group $RESOURCE_GROUP \
--environment $ENVIRONMENT \
--image $ACR_NAME.azurecr.io/$API_NAME \
--target-port 8080 \
--ingress external \
--registry-server $ACR_NAME.azurecr.io \
--user-assigned "$IDENTITY_ID" \
--registry-identity "$IDENTITY_ID" \
--query properties.configuration.ingress.fqdn
az container delete --name sampleapp --resource-group nobsmed