From 3aa33aa52ca760daacf12c5eee988533fd779f73 Mon Sep 17 00:00:00 2001 From: Mark Shust Date: Thu, 14 Feb 2019 10:39:12 -0500 Subject: [PATCH] Version 22.0.0 with Redis support! --- CHANGELOG.md | 10 ++++++++++ README.md | 21 ++++++++++++++++++--- compose/magento-2/bin/setup | 6 ++++++ compose/magento-2/docker-compose.dev.yml | 3 +-- compose/magento-2/docker-compose.yml | 2 +- 5 files changed, 36 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 452fd16b3..756e8818f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - N/A +## [22.0.0] - 2018-02-14 + +### Added +- Host bind mount `var/log` folder in `docker-compose.dev.yml` for debugging purposes. +- Redis is now the default storage engine for cache and session. Massively improved performance for local dev! 🚀 +- Added commented-out line in `docker-compose.dev.yml` file to easily mount `auth.json` file, with updated usage in README + +### Fixed +- Cron not working correctly + ## [21.1.2] - 2018-02-04 ### Fixed diff --git a/README.md b/README.md index 2400c1c3a..e1f83248d 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ open https://magento2.test - `bin/magento`: Run the Magento CLI. Ex: `bin/magento cache:flush` - `bin/node`: Run the node binary. Ex. `bin/node --version` - `bin/npm`: Run the npm binary. Ex. `bin/npm install` +- `bin/redis`: Run a command from the redis container. Ex `bin/redis redis-cli monitor` - `bin/remove`: Remove all containers. - `bin/removevolumes`: Remove all volumes. - `bin/restart`: Stop and then start all containers. @@ -158,11 +159,25 @@ The hostname of each service is the name of the service within the `docker-compo First setup Magento Marketplace authentication (details in the [DevDocs](http://devdocs.magento.com/guides/v2.0/install-gde/prereq/connect-auth.html)). -After doing so, copy `src/auth.json.sample` to `~/.composer/auth.json`. Then update the username and password values with your Magento public and private keys, respectively. The entire `~/.composer` directory is remotely mounted to the container, so Composer will automatically see your keys to authenticate. +Copy `src/auth.json.sample` to `src/auth.json`. Then, update the username and password values with your Magento public and private keys, respectively. Finally, copy the file to the container by running `bin/copytocontainer auth.json`. -The other option is copy `src/auth.json.sample` to `src/auth.json`. Then, uncomment the following line in `docker-compose.dev.yml` so it reads: +### Redis -`- ./src/auth.json:/var/www/html/auth.json:delegated` +Redis is now the default cache and session storage engine, and is automatically configured & enabled when running `bin/setup` on new installs. + +Use the following lines to enable Redis on existing installs: + +**Enable for Cache:** + +`bin/magento setup:config:set --cache-backend=redis --cache-backend-redis-server=redis --cache-backend-redis-db=0` + +**Enable for Session:** + +`bin/magento setup:config:set --session-save=redis --session-save-redis-host=redis --session-save-redis-log-level=4 --session-save-redis-db=1` + +You may also monitor Redis by running: `bin/redis redis-cli monitor` + +For more information about Redis usage with Magento, see the DevDocs. ### Xdebug & VS Code diff --git a/compose/magento-2/bin/setup b/compose/magento-2/bin/setup index d7fe43c40..c3be0d2ae 100755 --- a/compose/magento-2/bin/setup +++ b/compose/magento-2/bin/setup @@ -39,6 +39,12 @@ bin/clinotty bin/magento indexer:reindex echo "Forcing deploy of static content to speed up initial requests..." bin/clinotty bin/magento setup:static-content:deploy -f +echo "Enabling redis for cache..." +bin/clinotty bin/magento setup:config:set --no-interaction --cache-backend=redis --cache-backend-redis-server=redis --cache-backend-redis-db=0 + +echo "Enabling Redis for session..." +bin/clinotty bin/magento setup:config:set --no-interaction --session-save=redis --session-save-redis-host=redis --session-save-redis-log-level=4 --session-save-redis-db=1 + echo "Clearing the cache for good measure..." bin/clinotty bin/magento cache:flush diff --git a/compose/magento-2/docker-compose.dev.yml b/compose/magento-2/docker-compose.dev.yml index 25a00a3d0..5e4644f78 100644 --- a/compose/magento-2/docker-compose.dev.yml +++ b/compose/magento-2/docker-compose.dev.yml @@ -1,5 +1,5 @@ # Mark Shust's Docker Configuration for Magento (https://github.com/markshust/docker-magento) -# Version 21.1.2 +# Version 22.0.0 version: "3" @@ -10,7 +10,6 @@ services: - ./src/app/code:/var/www/html/app/code:delegated - ./src/app/design:/var/www/html/app/design:delegated - ./src/app/etc:/var/www/html/app/etc:delegated - #- ./src/auth.json:/var/www/html/auth.json:delegated - ./src/composer.json:/var/www/html/composer.json:delegated - ./src/composer.lock:/var/www/html/composer.lock:delegated - ./src/nginx.conf.sample:/var/www/html/nginx.conf:delegated diff --git a/compose/magento-2/docker-compose.yml b/compose/magento-2/docker-compose.yml index 745cf216e..3681d15ad 100644 --- a/compose/magento-2/docker-compose.yml +++ b/compose/magento-2/docker-compose.yml @@ -1,5 +1,5 @@ # Mark Shust's Docker Configuration for Magento (https://github.com/markshust/docker-magento) -# Version 21.2.0 +# Version 22.0.0 version: "3"