Skip to content

Commit

Permalink
DD#0000: feat: Added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
valguss committed Jan 18, 2023
1 parent dec1406 commit dde8ca9
Showing 1 changed file with 52 additions and 35 deletions.
87 changes: 52 additions & 35 deletions docs/recipe/magento2.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,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');`
Expand All @@ -68,7 +68,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']);`
Expand All @@ -81,7 +81,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');`
Expand All @@ -92,7 +92,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)



Expand All @@ -102,7 +102,7 @@ return time();


### shared_files
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L43)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L45)

Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`.

Expand All @@ -117,7 +117,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#L47)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L49)

Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`.

Expand All @@ -143,7 +143,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#L62)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L64)

Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`.

Expand All @@ -161,7 +161,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#L69)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L71)

Overrides [clear_paths](/docs/recipe/deploy/clear_paths.md#clear_paths) from `recipe/deploy/clear_paths.php`.

Expand All @@ -180,7 +180,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#L78)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L80)



Expand All @@ -193,7 +193,7 @@ return $matches[0] ?? '2.0';


### maintenance_mode_status_active
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L85)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L87)



Expand All @@ -205,7 +205,7 @@ return strpos($maintenanceModeStatusOutput, MAINTENANCE_MODE_ACTIVE_OUTPUT_MSG)


### enable_zerodowntime
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L92)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L94)

Deploy without setting maintenance mode if possible

Expand All @@ -215,7 +215,7 @@ true


### artifact_file
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L229)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L231)

artifact deployment section
settings section
Expand All @@ -226,7 +226,7 @@ settings section


### artifact_dir
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L230)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L232)



Expand All @@ -236,7 +236,7 @@ settings section


### artifact_excludes_file
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L231)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L233)



Expand All @@ -246,7 +246,7 @@ settings section


### artifact_path
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L233)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L235)



Expand All @@ -259,7 +259,7 @@ return get('artifact_dir') . '/' . get('artifact_file');


### bin/tar
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L240)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L242)


:::info Autogenerated
Expand All @@ -270,14 +270,14 @@ The value of this configuration is autogenerated on access.


### additional_shared_files
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L301)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L303)

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#L303)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L305)

Array of shared directories that will be added to the default shared_dirs without overriding

Expand All @@ -287,71 +287,71 @@ 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#L96)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L98)

Compiles magento di.

Tasks


### magento:deploy:assets
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L103)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L105)

Deploys assets.




### magento:sync:content_version
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L116)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L118)

Syncs content version.




### magento:maintenance:enable
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L126)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L128)

Enables maintenance mode.




### magento:maintenance:disable
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L131)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L133)

Disables maintenance mode.




### magento:config:import
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L136)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L138)

Config Import.




### magento:upgrade:db
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L171)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L173)

Upgrades magento database.




### magento:cache:flush
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L198)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L200)

Flushes Magento Cache.




### deploy:magento
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L203)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L205)

Magento2 deployment operations.

Expand All @@ -366,7 +366,7 @@ This task is group task which contains next tasks:


### magento:build
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L211)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L213)

Magento2 build operations.

Expand All @@ -379,7 +379,7 @@ This task is group task which contains next tasks:


### deploy
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L217)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L219)

Deploys your project.

Expand All @@ -395,50 +395,67 @@ This task is group task which contains next tasks:


### artifact:package
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L250)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L252)

Packages all relevant files in an artifact.

tasks section


### artifact:upload
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L260)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L262)

Uploads artifact in release folder for extraction.




### artifact:extract
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L265)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L267)

Extracts artifact in release path.




### build:remove-generated
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L271)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L273)

Clears generated files prior to building.




### build:prepare
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L276)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L278)

Prepare local artifact build.




### deploy:additional-shared
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L307)
[Source](https://github.com/deployphp/deployer/blob/master/recipe/magento2.php#L309)

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#L319)

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#L346)

Cleanup cache id_prefix env files.

After successful deployment, move the tmp_env.php file to env.php ready for next deployment


0 comments on commit dde8ca9

Please sign in to comment.