What is the default admin account?
App key exists -- skipping
Migrating database
Creating default admin account
Seeding initial data
The absolute path to your media directory. If this is skipped (left blank) now, you can set it later via the web interface.
Media path [/music]:
>
Now to front-end stuff
Oops! Koel installation or upgrade didn't finish successfully.
Please try again, or visit https://docs.koel.dev for manual installation.
😥 Sorry for this. You deserve better.
Creating default admin account
What is the default admin account?
The first run didn't let me create a new account
Username: [email protected]
Password: KoelIsCool
Hi, It's unusual that it just created a default admin account, usually it asks for your email and password (twice). Indeed @samstarnes is correct, those are the default credentials (see the command's code).
If you need, there is also a command to reset the admin password, check out the docs here
I just tried from a new installation and indeed it no longer asks what the admin account should be 😕
So it turns out it was a feature from v5.1.0 I was unaware of. I've updated the README to explain that koel:init now creates a default admin account.
Thank you for this! Been searching the username and password for a while!
Maybe consider adding this bit in this repo's github page?
Just ran koel on docker and was NOT able to login without running the init command. But it is said the default user/pass would work. Any help here please ?
Hi @blmhemu it's the expected outcome. You still need to run koel:init and then enter the default username and password
Hi @Hyzual thanks for the clarification. I was wondering if it is possible to automate this, say, by adding the command in Dockerfile itself instead of user needing to manually execing into the container (which IMO is not a good practice)
It should be possible, I'll look into it when I do the koel version bump
Hi @blmhemu, so I tried changing the entrypoint script to run koel:init automatically but it does not work. If I just put the command in the entrypoint, it fails because connection to the database is refused. It is expected that it fails because the database can take some time to spin up and be ready to accept connections (for example, the mysql database container needs about 10 seconds before it's ready).
I could not find a Laravel command to verify that the database is ready :confused:. Since this image supports both postgreSQL and MySQL, I cannot hardcode a command with one of those clients to check the database. So I'm out of reliable options, I don't know how to wait for the database to be ready before running koel:init. If you have an idea, do not hesitate to share it here.
So, for the time being, I'm afraid I cannot automate this. People will still need to run koel:init manually...
Hey ! Thanks for the effort @Hyzual ! I remember seeing a similar issue elsewhere... I think they got around it by using some kind of bash script which waits for the DB to be up and running before running the commands. Let me check if I can find it.
Here are some which people tend to use.
- https://github.com/vishnubob/wait-for-it (Docker: https://github.com/whs/docker-wait-for-it)
- https://github.com/palfrey/wait-for-db
- https://github.com/eficode/wait-for
- https://github.com/nickjj/wait-until
- https://github.com/ufoscout/docker-compose-wait
Thanks for the links, I didn't know those existed ! I don't know when I'll have time but I'll try those