Closed Brancliff closed 2 years ago
Hi, you should exec into the container the command php artisan koel:init --no-assets
before logging in. This command will run DB migrations and finish setup. Please see the First run section of the README for the commands.
It is not done automatically by the container, see #68 for more details about that.
Thank you! I cant believe I was missing something really obvious after all. I did see this in the README, but I guessed that it was an either-or situation-- like, v5.1.0 users would use the default account while anyone v5.0 and below users would go through the DB creation setup. I now know it's not quite like that- my bad!
I've gotten to the Web UI itself and now I have two questions:
Sorry for the misunderstanding, it is still required to run the command the first time you run the container. Let me know if you have ideas on how to phrase it better in the README :wink:.
About question 1., you should make sure the music folder is readable / accessible by the www-data
user which should have uid/gid = 1000. The easiest way to check is to exec into the container with docker exec -it <container_name_for_koel> bash
and then ls -la /share/CE_CACHEDEV1_DATA/Library/Projects/Koel/music/
. Those commands should let you know if there is a filesystem permission problem.
About question 2., I have never done so myself but there is a section in the documentation related to that: Youtube setup. As for the docker container, you can pass it the YOUTUBE_API_KEY
env variable. As it should stay secret, I suggest to create an .env
file and restrict its permissions and then pass it via docker-compose, for example:
#koel.env
YOUTUBE_API_KEY=<key>
#docker-compose.yml
koel:
#...
ports: #...
env_file:
- koel.env
volumes: #...
Oh, this was another silly oversight for me - since I mounted the music folder in my docker-compose, /music links to /Library/Projects/Koel/music/, so actually, all I needed to do was tell the container to point to /music to find my audio.
Thanks a lot! I've actually gotten things set up, connected my music, and my YouTube api key. Things are moving well and I'm able to start moving everything over! I just have two things I'm still thinking about:
Thanks so much for helping me get this far!
Hi, I'm glad you could make it work :smiley:.
- Sometimes when rescanning my library, I'll just get "unknown error" as the red popup in the top right.
I've encountered that too, and frankly I don't have ideas on why it works sometimes. This is why I preferred to run the scan on the command-line because it gives you more feedback for what the errors were. Maybe you can find the errors in the log files at /var/www/html/storage/laravel.log
? The file might not exist, which would mean there are no logs.
- On the topic of rescanning my library, could you guide me through how to [https://docs.koel.dev/watch.html#_2-set-up-a-watcher-script](set up the watcher script) on docker?
Unfortunately, I don't know if I can help you, I've never set this up :sweat_smile:. I don't have the setup to try right now but if inotifywait
does not exist on the container, maybe it's possible to install it with apt-get install inotifywait
or something similar. The docker image is based on Debian, so commands like apt-get
might work.
You're welcome !
hello
using docker-compose + postgresql is not working ; defaut admin account is created with latest koel version, but unable to login.
when I try to change password, I have this issue ; can't explain why.
marc@nas:~/docker/kalif/music-koel$ docker-compose exec koel bash
root@872051bd5ca8:/var/www/html# php artisan koel:admin:change-password
Illuminate\Database\QueryException
SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "users" does not exist
LINE 1: select * from "users" where "is_admin" = $1 limit 1
^ (SQL: select * from "users" where "is_admin" = 1 limit 1)
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:759
755▕ // If an exception occurs when attempting to run a query, we'll format the error
756▕ // message to include the bindings with SQL, which will make this exception a
757▕ // lot more helpful to the developer instead of just the database's errors.
758▕ catch (Exception $e) {
➜ 759▕ throw new QueryException(
760▕ $query, $this->prepareBindings($bindings), $e
761▕ );
762▕ }
763▕ }
+12 vendor frames
13 app/Console/Commands/Admin/ChangePasswordCommand.php:30
Illuminate\Database\Eloquent\Builder::first()
+13 vendor frames
27 artisan:35
Illuminate\Foundation\Console\Kernel::handle()
switching to mysql database is OK for me. Docker-compose.yml file are nearly same as in this repo.
I picked the MySQL docker-compose for koel if that changes anything- but, I just can't get past the login screen.
The readme states that with newer versions, it should automatically create a default admin account of email: admin@koel.dev | KoelIsCool. It just hasn't been working for me, and I copy/pasted it, so I know I didn't mistype it or anything.
Am I missing something really obvious here?