diff --git a/docker-compose.yml b/docker-compose.yml index 19c7758..7100ac5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,12 @@ services: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=postgres + healthcheck: + #CHANGE 1: this command checks if the database is ready, right on the source db server + test: [ "CMD-SHELL", "pg_isready" ] + interval: 5s + timeout: 5s + retries: 5 web: image: registry.k0.hswaw.net/palid/spejstore:1689856372 @@ -17,7 +23,8 @@ services: ports: - "8000:8000" depends_on: - - db + db: + condition: service_healthy environment: - SPEJSTORE_CLIENT_ID - SPEJSTORE_SECRET