[GH-ISSUE #1729] Docker: PostgreSQL Healthcheck fails #496

Open
opened 2026-02-26 18:47:18 +03:00 by kerem · 0 comments
Owner

Originally created by @tutorempire on GitHub (Mar 28, 2025).
Original GitHub issue: https://github.com/documenso/documenso/issues/1729

Issue Description

When trying to start documenso using the compose.yml file provided by the project, the PostgreSQL healthcheck fails because the pg_sql specifies a username with -U but omits the database name with -d .

It seems that pg_isready tries to connect to a database with the same name as the username, and fails.

The current code i

healthcheck:
  test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER}']
  interval: 10s

the code that fixes the problem would be:

healthcheck:
  test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
  interval: 10s

Steps to Reproduce

Set up documenso via the production docker compose. Edit the .env as directed. Start, and watch the logs.

Expected Behavior

The healthcheck should succeed by connecting to the database named in the .env config file

Current Behavior

No response

Screenshots (optional)

No response

Operating System [e.g., Windows 10]

Ubuntu 24.04

Browser [e.g., Chrome, Firefox]

Chrome

Version [e.g., 2.0.1]

docker current

Please check the boxes that apply to this issue report.

  • I have searched the existing issues to make sure this is not a duplicate.
  • I have provided steps to reproduce the issue.
  • I have included relevant environment information.
  • I have included any relevant screenshots.
  • I understand that this is a voluntary contribution and that there is no guarantee of resolution.
  • I want to work on creating a PR for this issue if approved
Originally created by @tutorempire on GitHub (Mar 28, 2025). Original GitHub issue: https://github.com/documenso/documenso/issues/1729 ### Issue Description When trying to start documenso using the compose.yml file provided by the project, the PostgreSQL healthcheck fails because the pg_sql specifies a username with -U <username> but omits the database name with -d <dbname>. It seems that pg_isready tries to connect to a database with the same name as the username, and fails. The current code i > healthcheck: > test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER}'] > interval: 10s the code that fixes the problem would be: > healthcheck: > test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'] > interval: 10s ### Steps to Reproduce Set up documenso via the production docker compose. Edit the .env as directed. Start, and watch the logs. ### Expected Behavior The healthcheck should succeed by connecting to the database named in the .env config file ### Current Behavior _No response_ ### Screenshots (optional) _No response_ ### Operating System [e.g., Windows 10] Ubuntu 24.04 ### Browser [e.g., Chrome, Firefox] Chrome ### Version [e.g., 2.0.1] docker current ### Please check the boxes that apply to this issue report. - [x] I have searched the existing issues to make sure this is not a duplicate. - [x] I have provided steps to reproduce the issue. - [x] I have included relevant environment information. - [ ] I have included any relevant screenshots. - [x] I understand that this is a voluntary contribution and that there is no guarantee of resolution. - [ ] I want to work on creating a PR for this issue if approved
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#496
No description provided.