services:
postgres:
image: postgres:16-alpine
entrypoint:
- /bin/sh
- -ec
- |
mv /usr/local/bin/pg_isready /usr/local/bin/pg_isready.real
printf '%s\n' '#!/bin/sh' 'exec /usr/local/bin/pg_isready.real -h 127.0.0.1 "$@"' > /usr/local/bin/pg_isready
chmod +x /usr/local/bin/pg_isready
exec docker-entrypoint.sh postgres
environment:
POSTGRES_DB: noxid_test
POSTGRES_PASSWORD: noxid_test
POSTGRES_USER: noxid_test
ports:
- "127.0.0.1::5432"
healthcheck:
test:
interval: 250ms
timeout: 2s
retries: 80