diff --git a/docs/recipe/magento2.md b/docs/recipe/magento2.md index 09a1d024d..edfa0becc 100644 --- a/docs/recipe/magento2.md +++ b/docs/recipe/magento2.md @@ -111,7 +111,7 @@ The magento2 recipe is based on the [common](/docs/recipe/common.md) recipe. ## Configuration ### static_content_locales -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L23) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L25) By default setup:static-content:deploy uses `en_US`. To change that, simply put `set('static_content_locales', 'en_US de_DE');` @@ -123,7 +123,7 @@ in you deployer script. ### magento_themes -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L29) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L31) You can also set the themes to run against. By default it'll deploy all themes - `add('magento_themes', ['Magento/luma', 'Magento/backend']);` @@ -136,7 +136,7 @@ all themes - `add('magento_themes', ['Magento/luma', 'Magento/backend']);` ### static_content_jobs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L37) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L39) Also set the number of conccurent jobs to run. The default is 1 Update using: `set('static_content_jobs', '1');` @@ -147,7 +147,7 @@ Update using: `set('static_content_jobs', '1');` ### content_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L39) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L41) @@ -157,7 +157,7 @@ return time(); ### magento_dir -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L44) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L46) Magento directory relative to repository root. Use "." (default) if it is not located in a subdirectory @@ -167,7 +167,7 @@ Magento directory relative to repository root. Use "." (default) if it is not lo ### shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L47) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L49) Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`. @@ -182,7 +182,7 @@ Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recip ### shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L51) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L53) Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`. @@ -208,7 +208,7 @@ Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/ ### writable_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L66) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L68) Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`. @@ -226,7 +226,7 @@ Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `r ### clear_paths -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L73) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L75) Overrides [clear_paths](/docs/recipe/deploy/clear_paths.md#clear_paths) from `recipe/deploy/clear_paths.php`. @@ -245,7 +245,7 @@ Overrides [clear_paths](/docs/recipe/deploy/clear_paths.md#clear_paths) from `re ### bin/magento -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L82) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L84) @@ -255,7 +255,7 @@ Overrides [clear_paths](/docs/recipe/deploy/clear_paths.md#clear_paths) from `re ### magento_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L84) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L86) @@ -268,7 +268,7 @@ return $matches[0] ?? '2.0'; ### maintenance_mode_status_active -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L91) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L93) @@ -280,7 +280,7 @@ return strpos($maintenanceModeStatusOutput, MAINTENANCE_MODE_ACTIVE_OUTPUT_MSG) ### enable_zerodowntime -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L98) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L100) Deploy without setting maintenance mode if possible @@ -290,7 +290,7 @@ true ### artifact_file -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L263) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L265) The file the artifact is saved to @@ -300,7 +300,7 @@ The file the artifact is saved to ### artifact_dir -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L266) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L268) The directory the artifact is saved in @@ -310,7 +310,7 @@ The directory the artifact is saved in ### artifact_excludes_file -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L270) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L272) Points to a file with a list of files to exclude from packaging. The format is as with the `tar --exclude-from=[file]` option @@ -321,7 +321,7 @@ The format is as with the `tar --exclude-from=[file]` option ### build_from_repo -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L273) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L275) If set to true, the artifact is built from a clean copy of the project repository instead of the current working directory @@ -331,7 +331,7 @@ false ### repository -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L276) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L278) Overrides [repository](/docs/recipe/common.md#repository) from `recipe/common.php`. @@ -343,7 +343,7 @@ null ### artifact_path -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L279) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L281) The relative path to the artifact file. If the directory does not exist, it will be created @@ -356,7 +356,7 @@ return get('artifact_dir') . '/' . get('artifact_file'); ### bin/tar -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L287) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L289) The location of the tar command. On MacOS you should have installed gtar, as it supports the required settings :::info Autogenerated @@ -367,14 +367,14 @@ The value of this configuration is autogenerated on access. ### additional_shared_files -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L359) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L361) Array of shared files that will be added to the default shared_files without overriding ### additional_shared_dirs -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L361) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L363) Array of shared directories that will be added to the default shared_dirs without overriding @@ -384,7 +384,7 @@ Array of shared directories that will be added to the default shared_dirs withou ## Tasks ### magento:compile -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L108) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L110) Compiles magento di. @@ -396,7 +396,7 @@ e.g. ### magento:deploy:assets -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L134) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L136) Deploys assets. @@ -423,7 +423,7 @@ in `app/etc/config.php`, e.g.: ### magento:sync:content_version -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L147) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L149) Syncs content version. @@ -431,7 +431,7 @@ Syncs content version. ### magento:maintenance:enable -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L157) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L159) Enables maintenance mode. @@ -439,7 +439,7 @@ Enables maintenance mode. ### magento:maintenance:disable -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L163) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L165) Disables maintenance mode. @@ -447,7 +447,7 @@ Disables maintenance mode. ### magento:config:import -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L169) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L171) Config Import. @@ -455,7 +455,7 @@ Config Import. ### magento:upgrade:db -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L204) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L206) Upgrades magento database. @@ -463,7 +463,7 @@ Upgrades magento database. ### magento:cache:flush -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L231) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L233) Flushes Magento Cache. @@ -471,7 +471,7 @@ Flushes Magento Cache. ### deploy:magento -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L236) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L238) Magento2 deployment operations. @@ -486,7 +486,7 @@ This task is group task which contains next tasks: ### magento:build -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L244) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L246) Magento2 build operations. @@ -499,7 +499,7 @@ This task is group task which contains next tasks: ### deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L250) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L252) Deploys your project. @@ -515,7 +515,7 @@ This task is group task which contains next tasks: ### artifact:package -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L298) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L300) Packages all relevant files in an artifact. @@ -523,7 +523,7 @@ Packages all relevant files in an artifact. ### artifact:upload -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L308) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L310) Uploads artifact in release folder for extraction. @@ -531,7 +531,7 @@ Uploads artifact in release folder for extraction. ### artifact:extract -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L313) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L315) Extracts artifact in release path. @@ -539,7 +539,7 @@ Extracts artifact in release path. ### build:remove-generated -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L319) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L321) Clears generated files prior to building. @@ -547,7 +547,7 @@ Clears generated files prior to building. ### build:prepare -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L324) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L326) Prepare local artifact build. @@ -555,7 +555,7 @@ Prepare local artifact build. ### artifact:build -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L349) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L351) Builds an artifact. @@ -572,15 +572,32 @@ This task is group task which contains next tasks: ### deploy:additional-shared -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L365) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L367) Adds additional files and dirs to the list of shared files and dirs. +### magento:set_cache_prefix +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L377) + +Update cache id_prefix. + +Update cache ip_prefix on deploy so that you are compiling against a fresh cache +Reference Issue: https://github.com/davidalger/capistrano-magento2/issues/151 + + +### magento:cleanup_cache_prefix +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L404) + +Cleanup cache id_prefix env files. + +After successful deployment, move the tmp_env.php file to env.php ready for next deployment + + ### artifact:prepare -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L372) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L415) Prepares an artifact on the target server. @@ -600,7 +617,7 @@ This task is group task which contains next tasks: ### artifact:finish -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L385) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L428) Executes the tasks after artifact is released. @@ -615,7 +632,7 @@ This task is group task which contains next tasks: ### artifact:deploy -[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L393) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L436) Actually releases the artifact deployment.