cypht-org / cypht-docker

Legacy Docker image setup files to run Cypht
GNU General Public License v2.0
39 stars 24 forks source link

Could not find driver for postgresql #28

Open knop-ster opened 9 months ago

knop-ster commented 9 months ago

I would like to use postgresql as database. For my configuration i get the error message:

Waiting for database connection … (could not find driver)

My compose looks like

  cypht-db:
    image: postgres:15
    container_name: cypht-db
    restart: always
    environment:
      - POSTGRES_USER=cypht
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=cypht
    volumes:
      - /mnt/user/docker/cypht/backup:/backup
      - /mnt/user/docker/cypht/postgres/15:/var/lib/postgresql/data
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U cypht"]
      interval: 10s
      timeout: 5s
      retries: 5
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

  cypht-app:
    image: sailfrog/cypht-docker:latest
    container_name: cypht-app
    volumes:
      - ./cypht/users:/var/lib/hm3/users
    ports:
      - 80:80
    environment:
      - CYPHT_AUTH_USERNAME=admin
      - CYPHT_AUTH_PASSWORD=admin_password
      - CYPHT_DB_CONNECTION_TYPE=host
      - CYPHT_DB_HOST=cypht-db
      - CYPHT_DB_NAME=cypht
      - CYPHT_DB_USER=cypht
      - CYPHT_DB_PASS=password
      - CYPHT_DB_DRIVER=pgsql
      - CYPHT_SESSION_TYPE=DB
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

When i take a look at Dockerfile i see, that the pdo driver for postgresql is missing. I think the Pull Request #11 solves this issue.

rocket357 commented 6 months ago

I'm trying to do the same thing with cypht on kubernetes leveraging a postgres-operator (zalando) managed db.

image/cypht_setup_database.php contains the pgsql table commands as well, so it really seems as simple as adding the driver.

marclaporte commented 5 months ago

The good, the bad and the ugly: We need a Docker expert to guide us!