Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Show HN: Is_ready – Wait for many services to become available – 0 Dependencies. Parent comment
For example, in the case of PostgreSQL, there is already a tool called pg_isready [0] to do this inside a healthcheck as you described.
services: postgres-db: image: postgres healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"]
application: image: image depends_on: postgres-db: condition: service_healthy
[0] https://www.postgresql.org/docs/current/app-pg-isready.html
There are no comments on this comment yet.
For example, in the case of PostgreSQL, there is already a tool called pg_isready [0] to do this inside a healthcheck as you described.
services: postgres-db: image: postgres healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"]
However, this is not the case for other databases/services.[0] https://www.postgresql.org/docs/current/app-pg-isready.html