Yefet
Yefet

Reputation: 2086

Deploy docker compose on Azure Container App

from ACA docs we have to specify target port of the container

az containerapp create \
  --name my-container-app \
  --resource-group $RESOURCE_GROUP \
  --environment $CONTAINERAPPS_ENVIRONMENT \
  --image mcr.microsoft.com/azuredocs/containerapps-helloworld:latest \
  --target-port 80 \
  --ingress 'external' \
  --query configuration.ingress.fqdn

Now my question is how to deploy via docker-compose not just a single image, since there is a single target-port?

Upvotes: 6

Views: 18581

Answers (2)

Shakermaker
Shakermaker

Reputation: 174

To deploy with docker-compose, you can use this command: https://learn.microsoft.com/en-us/cli/azure/containerapp/compose

az containerapp compose create --environment
                               --resource-group
                               [--compose-file-path]
                               [--location]
                               [--registry-password]
                               [--registry-server]
                               [--registry-username]
                               [--tags]
                               [--transport]
                               [--transport-mapping]

Upvotes: 10

RamaraoAdapa
RamaraoAdapa

Reputation: 3119

If you want to deploy multiple containers to a single container app, you can define more than one container in the configuration's containers array

Reference: Containers in Azure Container Apps Preview | Microsoft Docs

Alternative

If you want to deploy your application via Docker Compose, you can deploy to Azure Web app

While creating the web app, select publish as Docker Container. Under Docker, select options as Docker Compose and provide the Docker Compose file

enter image description here

Upvotes: 1

Related Questions