fix: add explicit db name and user to pg_isready check

commit 783fd4d5f3
Author: forehalo <forehalo@gmail.com>
Date:   Mon Dec 9 20:55:43 2024 +0800

    chore: fix lint error

commit 0cf3740488
Author: Charles SENGES <charles.senges.io+github@protonmail.com>
Date:   Sun Dec 8 01:05:36 2024 +0100

    fix(compose.yaml): add explicit db name and user to pg_isready check
This commit is contained in:
forehalo
2024-12-10 09:38:19 +08:00
parent b55ec58bb8
commit 1514e1269d
2 changed files with 3 additions and 1 deletions

View File

@@ -59,7 +59,8 @@ services:
# or you may add 'POSTGRES_HOST_AUTH_METHOD=trust' to ignore postgres security policy
POSTGRES_HOST_AUTH_METHOD: trust
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
test:
['CMD', 'pg_isready', '-U', "${DB_USERNAME}", '-d', "${DB_DATABASE:-affine}"]
interval: 1m
start_interval: 10s
start_period: 1m