feat: in the docker-compose, wait until the db is ready before starting the test runner
This commit is contained in:
@@ -4,6 +4,11 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: postgres.Dockerfile
|
dockerfile: postgres.Dockerfile
|
||||||
restart: "always"
|
restart: "always"
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
|
||||||
|
interval: 1s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: mypassword
|
POSTGRES_PASSWORD: mypassword
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
@@ -20,7 +25,8 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: run.Dockerfile
|
dockerfile: run.Dockerfile
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
db:
|
||||||
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
RUST_LOG: "info"
|
RUST_LOG: "info"
|
||||||
DATABASE_URL: postgres://postgres:mypassword@db:5432/tycho_indexer_0
|
DATABASE_URL: postgres://postgres:mypassword@db:5432/tycho_indexer_0
|
||||||
|
|||||||
Reference in New Issue
Block a user