diff --git a/docker-compose.yml b/docker-compose.yml index 678e949e92..298cad455c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,12 @@ services: - POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set} - POSTGRES_USER=${POSTGRES_USER?Variable not set} - POSTGRES_DB=${POSTGRES_DB?Variable not set} + healthcheck: + test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -p 5432"] + interval: 5s + timeout: 5s + retries: 20 + start_period: 10s adminer: image: adminer @@ -42,7 +48,8 @@ services: - traefik-public - default depends_on: - - db + db: + condition: service_healthy env_file: - .env environment: