Postgres setup only works when DB_PORT specified explicitly
HannesJo0139 opened this issue · 2 comments
HannesJo0139 commented
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.
mattiasghodsian commented
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
patrick-motard commented
Lets get a PR out to update the documentation for the docker compose file to include this environment variable.