-
Notifications
You must be signed in to change notification settings - Fork 59
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
base: master
Are you sure you want to change the base?
Conversation
2b3354e
to
24076e4
Compare
@@ -1,10 +1,13 @@ | |||
#!/bin/bash | |||
#!/bin/sh |
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.
Why?
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.
just more compatible, it's not using anything bash related
|
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 |
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_INIT
flagside 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_CONFIG
to 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?