Logo

Deploy New App

Deploy a Blendx app to Azure Container Apps using Azure Container Registry

Deploy a Blendx standalone app to Azure Container Apps using Azure Container Registry (ACR).

Prerequisites

  • Azure CLI installed and configured
  • Docker installed locally
  • Access to the BLEND.APP resource group
  • Access to the blendappcr Azure Container Registry

Steps

1. Login to Container Registry

az acr login --name blendappcr

Get the registry password (save this for step 4):

az acr credential show --name blendappcr --query "passwords[0].value" -o tsv

2. Create Container Environment

Skip this step if the environment already exists.

az containerapp env create \
  --name blendx-app-env \
  --resource-group BLEND.APP \
  --location eastus

3. Build and Push Docker Image

Build for Linux AMD64 (required for Azure):

docker build --platform linux/amd64 -t blendappcr.azurecr.io/blendx-app:latest .

Push to Azure Container Registry:

docker push blendappcr.azurecr.io/blendx-app:latest

4. Create Container App

Skip this step if updating an existing app. See "Updating an Existing App" section below.

az containerapp create \
  --name blendx-app \
  --resource-group BLEND.APP \
  --environment blendx-app-env \
  --image blendappcr.azurecr.io/blendx-app:latest \
  --target-port 3000 \
  --ingress external \
  --registry-server blendappcr.azurecr.io \
  --registry-username blendappcr \
  --registry-password "<password-from-step-1>" \
  --cpu 0.5 \
  --memory 1Gi \
  --min-replicas 0 \
  --max-replicas 1

5. Set Environment Variables

az containerapp update \
  --name blendx-app \
  --resource-group BLEND.APP \
  --set-env-vars \
    "SESSION_SECRET=<your-session-secret>" \
    "API_URL=<your-api-url>" \
    "API_KEY=<your-api-key>"

6. Get App URL

az containerapp show \
  --name blendx-app \
  --resource-group BLEND.APP \
  --query properties.configuration.ingress.fqdn \
  -o tsv

7. View Logs

az containerapp logs show \
  --name blendx-app \
  --resource-group BLEND.APP \
  --follow

Updating an Existing App

To deploy a new version of an existing app:

# Build and push new image
docker build --platform linux/amd64 -t blendappcr.azurecr.io/blendx-app:latest .
docker push blendappcr.azurecr.io/blendx-app:latest

# Update the container app to use the new image
az containerapp update \
  --name blendx-app \
  --resource-group BLEND.APP \
  --image blendappcr.azurecr.io/blendx-app:latest

Important Notes

TopicDetails
PlatformAlways build with --platform linux/amd64 to avoid exec format errors on Azure
Cold StartsWith min-replicas 0, the first request will be slower as the container spins up
Cost~$20-30/month when mostly idle with the current configuration
PortEnsure your Dockerfile exposes port 3000 (or update --target-port accordingly)

Troubleshooting

Container fails to start

Check the logs:

az containerapp logs show \
  --name blendx-app \
  --resource-group BLEND.APP \
  --type system

Exec format error

Rebuild with the correct platform:

docker build --platform linux/amd64 -t blendappcr.azurecr.io/blendx-app:latest .

Environment variables not working

Verify current env vars:

az containerapp show \
  --name blendx-app \
  --resource-group BLEND.APP \
  --query "properties.template.containers[0].env"

We respect your privacy.

TLDR: We use cookies for language selection, theme, and analytics. Learn more.