feat: in the docker-compose, wait until the db is ready before starting the test runner

This commit is contained in:
adrian
2025-09-11 08:54:01 +02:00
committed by Adrian Benavides
parent 4aaaa0f3e3
commit 0de847740a

View File

@@ -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