Populate dotenv to config#409
Closed
BernardGoldberger wants to merge 7 commits intokoel:masterfrom
BernardGoldberger:moveENVtoConfig
Closed
Populate dotenv to config#409BernardGoldberger wants to merge 7 commits intokoel:masterfrom BernardGoldberger:moveENVtoConfig
BernardGoldberger wants to merge 7 commits intokoel:masterfrom
BernardGoldberger:moveENVtoConfig
Conversation
| if (!env('ADMIN_NAME') || !env('ADMIN_EMAIL') || !env('ADMIN_PASSWORD')) { | ||
| if (!config('koel.admin.name') || | ||
| !config('koel.admin.email') || | ||
| !config('koel.admin.password')) |
There was a problem hiding this comment.
Expected 1 space after closing parenthesis; found 9
| if (app()->environment() !== 'testing') { | ||
| $this->command->info('Admin user created. You can (and should) remove the auth details from .env now.'); | ||
| if (! app()->runningUnitTests()) { | ||
| $this->command->info('Admin user created. You can (and should) remove the auth details from .env now.'); |
There was a problem hiding this comment.
Line indented incorrectly; expected at least 12 spaces, found 8
Contributor
Author
|
I will fix it all up. |
| 'admin' => [ | ||
| 'name' => env('ADMIN_NAME'), | ||
| 'email' => env('ADMIN_EMAIL'), | ||
| 'password' => env('ADMIN_PASSWORD'), |
Member
|
This looks great! And thank you for your findings – I learned something new today. Can you
|
Contributor
Author
|
I'm not that good at this :-( Close this PR and I will make them from scratch. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I noticed that occasionally I would have an error
of course this make no sense since I have set the DB and password.
So I did some research and found 2 things
Here is a post vlucas/phpdotenv#76 (comment) by @GrahamCampbell about this.
In this PR I created a separate config file
koel.phpfor all Koel specific configurations, and I also fix #408.Going forward we can tell users to run
php artisan config:cacheonce they finnished setting up Koel, or we could even make part of thekoel:initcommand.Note
I think this might in fact be the actual issue with #393.