Trying to install a container app that needs access via 2 ports
AdamMorgan-1941
15
Reputation points
I have a container app running locally that has two ports exposed: 8080 and 8050. The former serves the UI and the latter is for uploads. I am trying to figure out how to phrase this in both the docker compose file and in the az containerapp up command. I am trying to decipher this document. Can I have a primary (serving the UI) and a secondary port? I am confused by the distinction between "target port" and "external port". Here is a snippet from my docker-compose:
python-server:
privileged: true
build:
context: .
dockerfile: dockerfile
working_dir: /
ports:
- '8080:8080'
- '8050:8050'
Here is my powershell command:
$RG="<redacted>"
$ACA_ENVIRONMENT="<redacted>"
$ACA_NAME="<redacted>"
$REGION_NAME="eastus"
$ACR_NAME="<redacted>"
$IMAGE_NAME="<redacted>"
$TARGET_PORT="8080"
$INGRESS="external"
$QUERY="properties.configuration.ingress.fqdn"
az containerapp up --name $ACA_NAME --resource-group $RG --environment $ACA_ENVIRONMENT --image $IMAGE_NAME --target-port $TARGET_PORT --ingress $INGRESS --query $QUERY