I’ve deployed a multi-container app to the Azure App Service with a minimalistic docker-compose file:
version: '3'
services:
backend:
image: myregistry.azurecr.io/backend:latest
ports:
- "3000:3000"
frontend:
image: myregistry.azurecr.io/frontend:latest
ports:
- "4173:4173"
Following the instructions here and considering this issue on how to specify non-standard (not 80/8080) ports, I set the WEBSITES_PORT
value to the frontend port, i.e. 4173.
The deployment is successful, but instead of the frontend, the backend (in that case the Python fastapi swagger) is exposed.
Any ideas on why that is, and how to configure the deployment to show the frontend?
2
Answers
I've been able to solve this by following the instructions here:
More specifically, I switched to using port 8080 for the frontend and changed the order in the docker-compose file to have the frontend service at the top.
Have you tried using a port other than 4173? This port seems to be classified as reserved, so Azure may be blocking the allocation.