Skip to content

Commit

Permalink
Merge branch 'release/2.3.11' into craft-webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed Sep 15, 2020
2 parents 0b0acd1 + ec29104 commit 13202af
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 6 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# nystudio107/craft Change Log

## 2.3.11 - 2020.09.15
### Changed
* Explicitly set `id` from APP_ID and use `keyPrefix` for cache component
*

## 2.3.10 - 2020.09.10
### Changed
* Sessions should use `REDIS_DEFAULT_DB`

## 2.3.9 - 2020.09.09
### Changed
* Better nginx config for local dev, based on `nystudio107/nginx`
Expand Down
2 changes: 2 additions & 0 deletions cms/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
use craft\helpers\App;

return [
'id' => App::env('APP_ID') ?: 'CraftCMS',
'modules' => [
'site-module' => [
'class' => \modules\sitemodule\SiteModule::class,
Expand All @@ -29,6 +30,7 @@
'components' => [
'cache' => [
'class' => yii\redis\Cache::class,
'keyPrefix' => App::env('APP_ID') ?: 'CraftCMS',
'redis' => [
'hostname' => App::env('REDIS_HOSTNAME'),
'port' => App::env('REDIS_PORT'),
Expand Down
6 changes: 3 additions & 3 deletions cms/config/app.web.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@
'components' => [
'session' => static function() {
// Get the default component config
$config = craft\helpers\App::sessionConfig();
$config = App::sessionConfig();
// Override the class to use Redis' session class and our config settings
$config['class'] = yii\redis\Session::class;
$config['keyPrefix'] = App::env('APP_ID') ?: 'CraftCMS';
$config['redis'] = [
'hostname' => App::env('REDIS_HOSTNAME'),
'port' => App::env('REDIS_PORT'),
'database' => App::env('REDIS_CRAFT_DB'),
'database' => App::env('REDIS_DEFAULT_DB'),
];
// Instantiate and return it
return Craft::createObject($config);
},

],
];
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "craftcms/craft",
"description": "nystudio107 Craft 3.4 CMS scaffolding project",
"version": "2.3.9",
"version": "2.3.11",
"keywords": [
"craft",
"cms",
Expand All @@ -25,7 +25,7 @@
},
"autoload": {
"psr-4": {
"modules\\": "modules/"
"modules\\sitemodule\\": "modules/sitemodule/src/"
}
},
"config": {
Expand All @@ -41,7 +41,8 @@
"@php -r \"unlink('composer.json');\"",
"@php -r \"unlink('composer.lock');\"",
"@php -r \"unlink('LICENSE.md');\"",
"@php -r \"unlink('README.md');\""
"@php -r \"unlink('README.md');\"",
"@composer dump-autoload -o"
]
}
}
39 changes: 39 additions & 0 deletions scripts/docker_prod_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# Build production assets
#
# Build the production assets inside of the buildchain Docker container
#
# @author nystudio107
# @copyright Copyright (c) 2020 nystudio107
# @link https://nystudio107.com/
# @package craft-scripts
# @since 1.2.2
# @license MIT

# Get the directory of the currently executing script
DIR="$(dirname "${BASH_SOURCE[0]}")"

# Include files
INCLUDE_FILES=(
"common/defaults.sh"
".env.sh"
)
for INCLUDE_FILE in "${INCLUDE_FILES[@]}"
do
if [[ ! -f "${DIR}/${INCLUDE_FILE}" ]] ; then
echo "File ${DIR}/${INCLUDE_FILE} is missing, aborting."
exit 1
fi
source "${DIR}/${INCLUDE_FILE}"
done

# Temporary db dump path (remote & local)
if [[ -z "${LOCAL_BUILDCHAIN_CONTAINER}" ]]; then
echo "Variable LOCAL_BUILDCHAIN_CONTAINER is missing from .env.sh, aborting."
else
docker exec -it ${LOCAL_BUILDCHAIN_CONTAINER} npm run build
fi

# Normal exit
exit 0
1 change: 1 addition & 0 deletions scripts/example.env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ GLOBAL_DB_DRIVER="mysql"
# -- LOCAL settings --

LOCAL_DB_CONTAINER="REPLACE_ME"
LOCAL_BUILDCHAIN_CONTAINER="REPLACE_ME"

# -- REMOTE settings --

Expand Down

0 comments on commit 13202af

Please sign in to comment.