hocam bir containerin diğer container ayağa kalkmadan başlamamasını istiyorum önce biri kalkacak ayağa sonra öbürü çalışmaya başlıcak nasıl yapabilirim ? Kodları aşağıya bırakıyorum.
services:
rabbit:
image: rabbitmq:3.13-management
hostname: rabbitmq
ports:
- “5672:5672”
- “15672:15672”
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
interval: 10s
timeout: 5s
retries: 10
start_period: 5s
extends:
file: common-config.yml
service: network-deploy-service
configserver:
image: “onrcanogul/configserver”
container_name: configserver-ms
ports:
- “8071:8071”
depends_on:
rabbit:
condition: service_healthy
healthcheck:
test: [“CMD”, “curl”, “-f”, “localhost:8071/actuator/health”]
interval: 10s
timeout: 5s
retries: 10
start_period: 10s
extends:
file: common-config.yml
service: microservice-base-config
loans:
image: “onrcanogul/loans”
container_name: loans-ms
ports:
- “8090:8090”
depends_on:
configserver:
condition: service_healthy
environment:
SPRING_APPLICATION_NAME: “loans”
extends:
file: common-config.yml
service: microservice-configserver-config
accounts:
image: “onrcanogul/accounts”
container_name: accounts-ms
ports:
- “8080:8080”
depends_on:
configserver:
condition: service_healthy
environment:
SPRING_APPLICATION_NAME: “accounts”
extends:
file: common-config.yml
service: microservice-configserver-config
cards:
image: “onrcanogul/cards”
container_name: cards-ms
ports:
- “9000:9000”
depends_on:
configserver:
condition: service_healthy
environment:
SPRING_APPLICATION_NAME: “cards”
extends:
file: common-config.yml
service: microservice-configserver-config
networks:
mynetwork:
driver: “bridge”