[GH-ISSUE #1716] docker cypht/cypht:2.4.2 not connect with POSTGRESQL #701

Closed
opened 2026-02-25 21:35:42 +03:00 by kerem · 5 comments
Owner

Originally created by @emicba126 on GitHub (Sep 30, 2025).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/1716

Originally assigned to: @IrAlfred on GitHub.

Hi!
When start container, show in logs:
Attempting to connect to database ... (1/10)
...
Unable to connect to database

Enviroment Database config:
DB_CONNECTION_TYPE=host
DB_DRIVER=pgsql
DB_HOST=cypht_postgres
DB_NAME=cypht
DB_USER=admin
DB_PASS=pass
DB_PORT=5432

The postgres container/server work correctly. Connections accept other containers and external connection! and database "cypht" was created correctly.
I've been checking the source code and other issues, but I couldn't detect the problem. The "logs" do not provide any information with "DEBUG_LOG=true".
Does anyone have the same problem? From what I read, the project has support for Postgres.
Thanks

Originally created by @emicba126 on GitHub (Sep 30, 2025). Original GitHub issue: https://github.com/cypht-org/cypht/issues/1716 Originally assigned to: @IrAlfred on GitHub. Hi! When start container, show in logs: **Attempting to connect to database ... (1/10) ... Unable to connect to database** Enviroment Database config: DB_CONNECTION_TYPE=host DB_DRIVER=pgsql DB_HOST=cypht_postgres DB_NAME=cypht DB_USER=admin DB_PASS=**pass** DB_PORT=5432 The postgres container/server work correctly. Connections accept other containers and external connection! and database **"cypht"** was created correctly. I've been checking the source code and other issues, but I couldn't detect the problem. The "logs" do not provide any information with "DEBUG_LOG=true". Does anyone have the same problem? From what I read, the project has support for Postgres. Thanks
kerem 2026-02-25 21:35:42 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@IrAlfred commented on GitHub (Oct 2, 2025):

Hello @emicba126,

Thank you for reporting this issue. We have reproduced the issue and we confirm this is a bug. We are working on it and we will update this issue as soon as we have a solution.

<!-- gh-comment-id:3359339220 --> @IrAlfred commented on GitHub (Oct 2, 2025): Hello @emicba126, Thank you for reporting this issue. We have reproduced the issue and we confirm this is a bug. We are working on it and we will update this issue as soon as we have a solution.
Author
Owner

@JulianBerkner commented on GitHub (Oct 2, 2025):

In case you are deploying with kubernetes, here is my fix in values.yaml,
It probably works like this for the docker image to:

controllers:
  main:
    strategy: Recreate
    containers:
      main:
        command:
          - /bin/sh
          - -ec
          - |
            set -e
            if ! php -m | grep -qi pdo_pgsql; then
              apk add --no-cache postgresql-libs
              apk add --no-cache --virtual .build-deps postgresql-dev
              docker-php-ext-install pdo_pgsql
              apk del .build-deps
            fi
            exec /usr/local/share/cypht/docker/docker-entrypoint.sh
        image:
          repository: cypht/cypht
          tag: 2.4.2
<!-- gh-comment-id:3361163222 --> @JulianBerkner commented on GitHub (Oct 2, 2025): In case you are deploying with kubernetes, here is my fix in values.yaml, It probably works like this for the docker image to: ``` controllers: main: strategy: Recreate containers: main: command: - /bin/sh - -ec - | set -e if ! php -m | grep -qi pdo_pgsql; then apk add --no-cache postgresql-libs apk add --no-cache --virtual .build-deps postgresql-dev docker-php-ext-install pdo_pgsql apk del .build-deps fi exec /usr/local/share/cypht/docker/docker-entrypoint.sh image: repository: cypht/cypht tag: 2.4.2 ```
Author
Owner

@emicba126 commented on GitHub (Oct 3, 2025):

In case you are deploying with kubernetes, here is my fix in values.yaml, It probably works like this for the docker image to:

controllers:
  main:
    strategy: Recreate
    containers:
      main:
        command:
          - /bin/sh
          - -ec
          - |
            set -e
            if ! php -m | grep -qi pdo_pgsql; then
              apk add --no-cache postgresql-libs
              apk add --no-cache --virtual .build-deps postgresql-dev
              docker-php-ext-install pdo_pgsql
              apk del .build-deps
            fi
            exec /usr/local/share/cypht/docker/docker-entrypoint.sh
        image:
          repository: cypht/cypht
          tag: 2.4.2

Hi! @JulianBerkner
Not use kubernetes, use docker-compose.
Add code list "command" in "entrypoint" section and start correctly! Just test the login by entering correctly. Thanks for the help!
Note for the next update for the correct connection with Postgres (test with version 17).
Thanks

<!-- gh-comment-id:3364060496 --> @emicba126 commented on GitHub (Oct 3, 2025): > In case you are deploying with kubernetes, here is my fix in values.yaml, It probably works like this for the docker image to: > > ``` > controllers: > main: > strategy: Recreate > containers: > main: > command: > - /bin/sh > - -ec > - | > set -e > if ! php -m | grep -qi pdo_pgsql; then > apk add --no-cache postgresql-libs > apk add --no-cache --virtual .build-deps postgresql-dev > docker-php-ext-install pdo_pgsql > apk del .build-deps > fi > exec /usr/local/share/cypht/docker/docker-entrypoint.sh > image: > repository: cypht/cypht > tag: 2.4.2 > ``` Hi! @JulianBerkner Not use kubernetes, use docker-compose. Add code list **"command"** in **"entrypoint"** section and start correctly! Just test the login by entering correctly. Thanks for the help! Note for the next update for the correct connection with Postgres (_test with version 17_). Thanks
Author
Owner

@christer77 commented on GitHub (Oct 6, 2025):

Related https://github.com/cypht-org/cypht/issues/1544

<!-- gh-comment-id:3370043301 --> @christer77 commented on GitHub (Oct 6, 2025): Related https://github.com/cypht-org/cypht/issues/1544
Author
Owner

@IrAlfred commented on GitHub (Nov 11, 2025):

Hello @emicba126

We've made several improvements and fixes in the newer version. Please retest with the cypht/cypht:2.5.1 Docker image.

If the issue persists with version 2.5.1, please let us know and we'll investigate further. You might also want to ensure that:

  • The cypht_postgres hostname is resolvable from within the Cypht container
  • All database credentials and connection parameters are correct
  • You provide the correct used DB_PORT (There were some issues with default MySQL port and socket)

We appreciate your help in improving Cypht!

<!-- gh-comment-id:3517259981 --> @IrAlfred commented on GitHub (Nov 11, 2025): Hello @emicba126 We've made several improvements and fixes in the newer version. Please retest with the cypht/cypht:2.5.1 Docker image. If the issue persists with version 2.5.1, please let us know and we'll investigate further. You might also want to ensure that: * The cypht_postgres hostname is resolvable from within the Cypht container * All database credentials and connection parameters are correct * You provide the correct used DB_PORT (There were some issues with default MySQL port and socket) We appreciate your help in improving Cypht!
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/cypht#701
No description provided.