-
Notifications
You must be signed in to change notification settings - Fork 58
add koel-init to do init tasks and add the flags to the docs, #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2b3354e to
24076e4
Compare
|
|
Yes, but consider two approaches:
I think (2) will look bad, hence the suggestion. |
|
well it's imo still a massive improvement over the old container just silently starting as if everything is fine and throwing error 500 on basically everything but i can give 1 a go |
|
just thought of another case though while working on these: all these options can technically get this all working without any .env file at all. might it be worth to otherwise
|
|
I'd actually prefer the |
|
added the warning and early script exit for when the file is missing |
|
|
||
| ## The `koel:init` command | ||
|
|
||
| This command is automatically ran when the container starts, but can be disabled if you want to do some manual adjustments first. As such it is often sufficient to provide the needed env variables to the container to setup koel. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the current text is pretty cryptic (e.g., what are "some manual adjustments" and what does "providing the needed env variables to the container" mean? I am the author of koel and I'm still having a hard time trying to wrap my head around it 🙂). Can ChatGPT help us here?
Also I don't think this paragraph doesn't blend well with the whole section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure how to word it better. the manul thing is more using the php commands to figue out why things don't work when the init fails entirely
this should be pretty rare though unless koel itself is broken completely already
Co-authored-by: Phan An <me@phanan.net>
Co-authored-by: Phan An <me@phanan.net>
|
@phanan is this good to merge now? not sure what you want me to do with that one open remark |
|
Thanks! |

Right now you can't deploy koel in docker without manual intervation, this pr resolves that by automatically running koel:init (as non interactive), as well as koel:doctor to report the status. If no config is present it will just "start" but not work as before until the user provides/mounts a valid .env file
However the big difference is now that once this config file exists, koel can self-update and no longer needs manual intervention. the init and doctor output during startup also makes it easier to diagnose issues for users unfamiliar with the koel inner workings. This behavior is on by default but can be disabled with the
SKIP_INITflagside note: smtp not being configured is currently an "error", this should probably be a warning since it work just fine without
This script can also optimize the config loading, since it has some pitfals for unaware users (requiring a config reboot to apply) i've left this off by default and needs the
OPTIMIZE_CONFIGto apply. While needing a reboot to apply config changes is fairly standard in docker containers, i didn't want to break current behavior. Maybe could be enabled by default in a later major release?