-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use separate app config files for web/console requests
- Loading branch information
Andrew Welch
committed
Mar 30, 2020
1 parent
d41d45d
commit 5e06222
Showing
3 changed files
with
56 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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,19 @@ | ||
<?php | ||
/** | ||
* Yii Console Application Config | ||
* | ||
* Edit this file at your own risk! | ||
* | ||
* The array returned by this file will get merged with | ||
* vendor/craftcms/cms/src/config/app.php and app.[web|console].php, when | ||
* Craft's bootstrap script is defining the configuration for the entire | ||
* application. | ||
* | ||
* You can define custom modules and system components, and even override the | ||
* built-in system components. | ||
* | ||
* This application config is applied only for *only* console requests | ||
*/ | ||
|
||
return [ | ||
]; |
This file contains 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 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,32 @@ | ||
<?php | ||
/** | ||
* Yii Web Application Config | ||
* | ||
* Edit this file at your own risk! | ||
* | ||
* The array returned by this file will get merged with | ||
* vendor/craftcms/cms/src/config/app.php and app.[web|console].php, when | ||
* Craft's bootstrap script is defining the configuration for the entire | ||
* application. | ||
* | ||
* You can define custom modules and system components, and even override the | ||
* built-in system components. | ||
* | ||
* This application config is applied only for *only* web requests | ||
*/ | ||
|
||
return [ | ||
'components' => [ | ||
'session' => [ | ||
'class' => \yii\redis\Session::class, | ||
'redis' => [ | ||
'hostname' => getenv('REDIS_HOSTNAME'), | ||
'port' => getenv('REDIS_PORT'), | ||
'database' => getenv('REDIS_CRAFT_DB'), | ||
], | ||
'as session' => [ | ||
'class' => \craft\behaviors\SessionBehavior::class, | ||
], | ||
], | ||
], | ||
]; |