koel / docker

A minimal docker image for the koel music streaming server.
https://hub.docker.com/r/phanan/koel/
MIT License
166 stars 54 forks source link

Need to run php artisan koel:init evertime container is restarted #180

Closed lenicyl closed 9 months ago

lenicyl commented 1 year ago

I am using PostgresSQL with koel.

The server works but everytime i restart the server using docker compose down and docker compose up -d, i need to run php artisan koel:init --no-assets again or else login wont work

Any users created prior to restart do not appear either

This is what the docker logs show, im not sure if its related

koel-db  | 2023-05-18 06:24:29.862 UTC [69] ERROR:  relation "personal_access_tokens" does not exist at character 15
koel-db  | 2023-05-18 06:24:29.862 UTC [69] STATEMENT:  select * from "personal_access_tokens" where "token" = $1 limit 1
koel-db  | 2023-05-18 06:24:29.865 UTC [69] ERROR:  relation "personal_access_tokens" does not exist at character 15
koel-db  | 2023-05-18 06:24:29.865 UTC [69] STATEMENT:  select * from "personal_access_tokens" where "token" = $1 limit 1
koel-db  | 2023-05-18 06:24:34.710 UTC [70] ERROR:  relation "personal_access_tokens" does not exist at character 15
koel-db  | 2023-05-18 06:24:34.710 UTC [70] STATEMENT:  select * from "personal_access_tokens" where "token" = $1 limit 1
koel-db  | 2023-05-18 06:24:34.712 UTC [70] ERROR:  relation "personal_access_tokens" does not exist at character 15
koel-db  | 2023-05-18 06:24:34.712 UTC [70] STATEMENT:  select * from "personal_access_tokens" where "token" = $1 limit 1
koel-db  | 2023-05-18 06:24:38.229 UTC [71] ERROR:  relation "personal_access_tokens" does not exist at character 15
koel-db  | 2023-05-18 06:24:38.229 UTC [71] STATEMENT:  select * from "personal_access_tokens" where "token" = $1 limit 1
koel-db  | 2023-05-18 06:24:38.231 UTC [71] ERROR:  relation "personal_access_tokens" does not exist at character 15
koel-db  | 2023-05-18 06:24:38.231 UTC [71] STATEMENT:  select * from "personal_access_tokens" where "token" = $1 limit 1
koel-db  | 2023-05-18 06:24:38.395 UTC [72] ERROR:  relation "personal_access_tokens" does not exist at character 15
koel-db  | 2023-05-18 06:24:38.395 UTC [72] STATEMENT:  select * from "personal_access_tokens" where "token" = $1 limit 1
koel-db  | 2023-05-18 06:24:38.397 UTC [72] ERROR:  relation "personal_access_tokens" does not exist at character 15
koel-db  | 2023-05-18 06:24:38.397 UTC [72] STATEMENT:  select * from "personal_access_tokens" where "token" = $1 limit 1
koel-db  | 2023-05-18 06:26:14.753 UTC [74] ERROR:  relation "personal_access_tokens" does not exist at character 15
koel-db  | 2023-05-18 06:26:14.753 UTC [74] STATEMENT:  select * from "personal_access_tokens" where "token" = $1 limit 1
koel-db  | 2023-05-18 06:26:14.755 UTC [74] ERROR:  relation "personal_access_tokens" does not exist at character 15
koel-db  | 2023-05-18 06:26:14.755 UTC [74] STATEMENT:  select * from "personal_access_tokens" where "token" = $1 limit 1
lenicyl commented 1 year ago

I tried mysql db, it does not forget any users created after restart I still do have to run php artisan koel:init though

Tommmciu commented 11 months ago

You have to preserve APP_KEY. Take a look on readme How to bind-mount the .env file section