diff --git a/protocol-testing/docker-compose.yaml b/protocol-testing/docker-compose.yaml index 393ac6e..e58e36a 100644 --- a/protocol-testing/docker-compose.yaml +++ b/protocol-testing/docker-compose.yaml @@ -4,6 +4,11 @@ services: context: . dockerfile: postgres.Dockerfile restart: "always" + healthcheck: + test: [ "CMD-SHELL", "pg_isready -U postgres" ] + interval: 1s + timeout: 5s + retries: 5 environment: POSTGRES_PASSWORD: mypassword POSTGRES_USER: postgres @@ -20,7 +25,8 @@ services: context: . dockerfile: run.Dockerfile depends_on: - - db + db: + condition: service_healthy environment: RUST_LOG: "info" DATABASE_URL: postgres://postgres:mypassword@db:5432/tycho_indexer_0