Postgres setup only works when DB_PORT specified explicitly · Issue #168 · koel/docker · GitHub
Skip to content

Postgres setup only works when DB_PORT specified explicitly #168

Open

Description

@HannesJo0139

Tried to setup using docker-compose.postgres.yml. Initialization seems to work but then login is impossible. Looking into log one can find that koel is trying to connect using port 3306 instead of 5432.

Long story short: One has to add env var DB_PORT=5432 to docker-compose.postgres.yml in order to make it work.

Activity

  1. mattiasghodsian commented on Aug 12, 2023

    @mattiasghodsian

    I can confirm this, report from laravel

    SQLSTATE[08006] [7] could not connect to server: Connection refused
    Is the server running on host "database" (172.26.0.2) and accepting
    TCP/IP connections on port 3306? (SQL: select * from "personal_access_tokens" where "token" = e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 limit 1)
    

    after doing php artisan koel:init --no-assets i hade to run php artisan serve and then i could login

  2. patrick-motard commented on Jan 3, 2024

    @patrick-motard

    Lets get a PR out to update the documentation for the docker compose file to include this environment variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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