Skip to content

Installation refuses to connect to database [postgres] #227

Description

@a-random-nerd11

I'm trying to deploy Koel on my cachyos system using postgres db, but when I run the koel:init command, i get the following output:


   INFO  Remember, you can always install/upgrade manually using the guide at https://docs.koel.dev.

  Clearing caches ....................................................................................... 3.50ms DONE
  .env file exists -- skipping ................................................................................. DONE
  Retrieving app key .................................................................................... 0.00ms DONE
  Using app key: base64:[REDACTED].. ............................................................................ DONE

   WARN  Cannot connect to the database. Let's set it up.

 Your DB driver of choice [MySQL/MariaDB]:
  [mysql     ] MySQL/MariaDB
  [pgsql     ] PostgreSQL
  [sqlsrv    ] SQL Server
  [sqlite-e2e] SQLite
 > %

docker-compose.yml:

services:
  koel:
    image: phanan/koel
    depends_on:
      - database
    ports:
      - 6600:80
    environment:
      - DB_CONNECTION=pgsql
      - DB_HOST=database
      - DB_PORT=5432
      - DB_USERNAME=koel
      - DB_PASSWORD=[redacted]
      - DB_DATABASE=koel
    volumes:
      - [path to music]:/music
      - [path to image storage]:/var/www/html/storage/app/public/images
      - [path to search-indexes]:/var/www/html/storage/search-indexes

  database:
    image: postgres:13
    volumes:
      - [path to db]:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=koel
      - POSTGRES_USER=koel
      - POSTGRES_PASSWORD=[redacted]

volumes:
  db:
    driver: local
  music:
    driver: local
  image_storage:
    driver: local
  search_index:
    driver: local

I've tried changing the port and path to database with no avail, and it refuses to connect when using the wizard that it presents me with.

Does anyone have a fix?
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions