anthonychu / containerapps-sidecar-sample

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Azure Container Apps sidecar example

Deploy the app

  1. Create a Container Apps environment.

    az containerapp env create --name demo --resource-group demo --location canadacentral
    
    # Get the environment id
    az containerapp env show --name demo --resource-group demo --query id
  2. Open app.yaml and update the managedEnvironmentId with the value from the previous step. Save the file.

  3. Create a container app.

    az containerapp create --name test-sidecar --resource-group demo --yaml app.yaml --query properties.configuration.ingress.fqdn
  4. Open the app at its URL.

  5. To observe the sidecar's streaming logs in real-time, run the following command:

    az containerapp logs show --name test-sidecar --resource-group demo --container sidecar --follow
  6. Click the Call sidecar button.

    • The main app will call the sidecar app. The result is displayed on the page.

    • The sidecar logs should show that it processed the request.

  7. Click the Write a file button.

    • The main app writes a file into a volume that it shares with the sidecar app.

    • The sidecar logs should show that it observed the file that was written.

About


Languages

Language:JavaScript 47.0%Language:HTML 33.8%Language:Dockerfile 19.2%