From f33f87f26041ef8a8fb1772108922bc55afa0022 Mon Sep 17 00:00:00 2001 From: surtur Date: Wed, 19 Jul 2023 22:17:40 +0200 Subject: [PATCH] justfile: add pg healthchecking --- justfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/justfile b/justfile index cc260eb..ac4f2bc 100644 --- a/justfile +++ b/justfile @@ -81,6 +81,12 @@ dbstart: -e POSTGRES_INITDB_ARGS="--auth-host=scram-sha-256 --auth-local=scram-sha-256" \ -v $PWD/tmp/db:/var/lib/postgresql/data:Z \ -p 127.0.0.1:5432:5432 \ + --health-cmd "sh -c 'pg_isready -U postgres -d posgres'" \ + --health-on-failure kill \ + --health-retries 3 \ + --health-interval 10s \ + --health-timeout 1s \ + --health-start-period=5s \ docker.io/library/postgres:15.2-alpine3.17 # stop pg.