Переглянути джерело

Version 22.0.0 with Redis support!

Mark Shust 6 роки тому
батько
коміт
3aa33aa52c

+ 10 - 0
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

+ 18 - 3
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, <a href="https://devdocs.magento.com/guides/v2.3/config-guide/redis/redis-session.html" target="_blank">see the DevDocs</a>.
 
 ### Xdebug & VS Code
 

+ 6 - 0
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
 

+ 1 - 2
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

+ 1 - 1
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"