I am trying to deploy my microservice app to Azure Container Instances. Each service is represented as a Docker image, which is stored in DockerHub. The whole app`s infrastructure is described in the docker-compose.yml file:
version: '3.7'
services:
db:
image: darkmode1012/ticketflow_db:1.0.0
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=postgres
- POSTGRES_HOST_AUTH_METHOD=trust
networks:
- ticketflow-network
restart: unless-stopped
ports:
- 5432:5432
consul:
image: "consul:1.8.5"
networks:
- ticketflow-network
ports:
- "8500:8500"
identity-service:
image: darkmode1012/ticketflow_identity-service:1.0.0
networks:
- ticketflow-network
depends_on:
- db
- consul
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://identity-service:9001
restart: unless-stopped
profile-service:
image: darkmode1012/ticketflow_profile-service:1.0.0
networks:
- ticketflow-network
depends_on:
- db
- consul
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://profile-service:9002
restart: unless-stopped
ticket-service:
image: darkmode1012/ticketflow_ticket-service:1.0.0
networks:
- ticketflow-network
depends_on:
- db
- consul
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://ticket-service:9003
restart: unless-stopped
movie-service:
image: darkmode1012/ticketflow_movie-service:1.0.0
networks:
- ticketflow-network
depends_on:
- db
- consul
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://movie-service:9004
restart: unless-stopped
api-gateway:
image: darkmode1012/ticketflow_api-gateway:1.0.0
networks:
- ticketflow-network
depends_on:
- consul
- identity-service
- profile-service
- ticket-service
- movie-service
environment:
- ASPNETCORE_ENVIRONMENT=Docker
- ASPNETCORE_URLS=http://host.docker.internal:8080
restart: unless-stopped
ports:
- "8080:8080"
web-client:
image: darkmode1012/ticketflow_web-client:1.0.0
networks:
- ticketflow-network
depends_on:
- api-gateway
ports:
- 3000:3000
stdin_open: true
networks:
ticketflow-network:
driver: bridge
When I run docker-compose up
locally - it works correctly. But when I try to deploy it to Azure Container Instances (following the guideline https://docs.microsoft.com/en-us/azure/container-instances/tutorial-docker-compose), I see the error:
D:\Developing\Ticket_Flow>docker compose up
[+] Running 0/1
- Group ticket_flow Waiting 92.4s
containerinstance.ContainerGroupsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=<nil> Code="ServiceUnavailable" Message="The requested resource is not available in the location 'eastus' at this moment. Please retry with a different resource request or in another location. Resource requested: '9' CPU '8.1' GB memory 'Linux' OS"
I have checked the availability of ACI for the chosen "eastus" region - it is available at the moment. https://status.azure.com/en-us/status?WT.mc_id=A52BDE99C
Also, I have tried to use a resource group with another region - the error remains.
Could you please give me an idea about what can cause this error and how should I fix it?