Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 872 Bytes

silence_warnings_from_postgres.md

File metadata and controls

27 lines (20 loc) · 872 Bytes

Silence Warnings from PostgreSQL

If you observer a plethora of warnings in your PostgreSQL Docker setup like:

FATAL: role "root" does not exist

If these errors are emitted from the PostgreSQL healthcheck, they can be silenced by adding the user parameter to the health check command for pg_isready in your docker-compose.yml file.

healthcheck:
   test: ["CMD-SHELL", "pg_isready -U postgres"]
   interval: 30s
   timeout: 30s
   retries: 3

This works for official PostgreSQL Docker images, where a postgres user is created, adjust to your own settings accordingly

References

-GitHub issue describing the symptom -GitHub commit describing the remedy