-
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
Open
AEnterprise
wants to merge
2
commits into
koel:master
Choose a base branch
from
AEnterprise:koel-init
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ | |
| !/apache.conf | ||
| !/php.ini | ||
| !/koel-entrypoint | ||
| !/koel-init | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,13 @@ | ||
| #!/bin/bash | ||
| #!/bin/sh | ||
|
|
||
| set -e | ||
|
|
||
| # Change to program root directory. | ||
| cd /var/www/html | ||
|
|
||
| # Run the koel-init script to (optionally) optimize configs and (optionally) run initialize/update koel | ||
| su -s '/bin/sh' -c "/usr/local/bin/koel-init" www-data | ||
|
|
||
| # Run the next entrypoint in the chain. | ||
| echo "running docker-php-entrypoint with arguments $@" | ||
| docker-php-entrypoint $@ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #!/bin/bash | ||
|
|
||
| if [[ ! -f /var/www/html/.env ]]; then | ||
| echo "No .env file found in /var/www/html, please make sure to mount an .env config file to store the configuration, you can use the koel:init command for a guided setup" | ||
| echo "" | ||
| echo "See https://github.com/koel/docker?tab=readme-ov-file#the-koelinit-command for more information about the init command" | ||
| echo "See https://github.com/koel/koel/blob/master/.env.example for an example env file if you want to change other configuration options as well or do a manual setup" | ||
| exit 0 | ||
| fi | ||
|
|
||
| if [[ -z "${SKIP_INIT}" ]]; then | ||
|
|
||
| if [[ -z "${OPTIMIZE_CONFIG}" ]]; then | ||
| echo "Config not optimized, if your config is locked in you can enable the OPTIMIZE_CONFIG option. Enabling this will optimize your config, but YOU WILL NOT BE ABLE TO MAKE CONFIG EDITS WITHOUT RESTARING THE CONTAINER" | ||
| else | ||
| echo "Optimizing config..." | ||
| # clear before caching, in case this is a container reboot and it was already cached from before | ||
| php artisan config:clear | ||
| php artisan config:cache | ||
| fi | ||
|
|
||
| # Invoke the init script so database migrations run and the config is at least partially validated | ||
| echo "Running installer..." | ||
| php artisan koel:init --no-assets --no-interaction | ||
| php artisan koel:doctor | ||
| else | ||
| echo "Skipped init, koel might not be able to run if it is misconfigured or your database is out of date. This should not be used outside of debugging or manual initial setups!" | ||
| fi |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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