Closed DaWy closed 2 years ago
Ok, so the problem is comming from running the command inside the container using bash as root user.
Running the koel:sync command from outside the container using docker exec works as expected. So a change in the main README.md should be done to preventing users to run the php artisan commands inside the container as root user.
Indeed, running koel:sync
as root will create index folders owned by root. Thanks for posting the follow-up with the resolution.
I'm not sure exactly what needs to change, feel free to open a pull request with the changes to the README, I'll review it and merge it.
I ran into this issue while working on the image. I added --user www-data
in all docker exec
command examples in the README.
I was today discovering Koel, so I did go throught the Docker way, as I am running a personal home server with docker setup:
The first run went all okay. But after doing the koel:sync, somethings weird happens: I cannot login again to Koel. Reading the logs inside storage/logs/laravel.log I can see this after a login try:
So i just checked out this dir, and I can se that almost everything inside the folder "/var/www/html/storage/framework/cache/data" is owned by root, but the folder itself is owned by www-data.
So i changed the content of this dir back to www-data owner, and now I can login without issues!
So I suspect something is wrong with the php artisan commands beeing run as user root inside the container and makes all of this folders unreadable by Koel, leaving with this permission issue and then unable to login.
So by now the fix remain on just changing the permissions on this folder after running the koel:sync command. But I think we should find a more "definitive" approach to this.