Browse Source

updated dependency for service health

pull/104/head
Galip Tolga Erdem 5 years ago
parent
commit
5a4448f715
  1. 12
      etc/docker/docker-compose.infrastructure.yml
  2. 9
      etc/docker/docker-compose.yml

12
etc/docker/docker-compose.infrastructure.yml

@ -17,11 +17,18 @@ services:
image: mongo:4.2
volumes:
- mongodb_data:/data/db
healthcheck:
test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 10
networks:
- eshoponabp-network
redis:
container_name: redis
image: redis:alpine
healthcheck:
test: ["CMD", "redis-cli","ping"]
networks:
- eshoponabp-network
@ -30,6 +37,11 @@ services:
image: postgres:14.1
volumes:
- postgres_data:/var/opt/postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- eshoponabp-network

9
etc/docker/docker-compose.yml

@ -19,9 +19,12 @@ services:
ports:
- "44353:443"
depends_on:
- redis
- postgres-db
- rabbitmq
redis:
condition: service_healthy
postgres-db:
condition: service_healthy
rabbitmq:
condition: service_healthy
restart: on-failure
networks:
- eshoponabp-network

Loading…
Cancel
Save