Skip to content

Commit

Permalink
added info of scopes to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
faradey committed Jan 14, 2024
1 parent 4c581b4 commit 12ab082
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ This project is written on Golang, and it is distributed under a MIT License.
* Magento Cloud
* Composer patches
* Magento Functional Testing Framework (MFTF). Learn [more](docs/mftf.md)
* Scopes. Learn [more](docs/scopes.md)

## Tested on
* Linux (Ubuntu 20.04)
Expand Down
22 changes: 22 additions & 0 deletions docs/scopes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The functionality of scopes will assist you in utilizing multiple environments for a single project.
For instance, suppose you have two branches, 'dev' and 'dev-upgrade'.
The 'dev' branch is intended for delivering updates and fixes to the master branch, while the 'dev-upgrade' branch is used for upgrading your project to a new major version of your platform.
Consequently, these branches may have different versions of PHP, MySQL, Redis, Elasticsearch, etc.
By employing two distinct scopes, you can configure two separate environments for one project.
When switching branches, you can simply change the scope and execute the `madock rebuild` command to apply the new settings.
The database for each scope will also be different.
This functionality will be particularly useful in the case of a major platform update, such as upgrading Magento from version 2.3 to version 2.4

The default scope is "default"

To add a new scope or switch to another scope, execute the command `madock scope:set {scope_name}`

To display a list of all scopes for the project, use the command `madock scope:list`


Scope settings are inherited in this order
madock/projects/{project_name}/config.xml {current scope} - the current scope you created
madock/projects/{project_name}/config.xml {default scope}
madock/projects/{project_name}/config.xml
madock/projects/config.xml
madock/config.xml

0 comments on commit 12ab082

Please sign in to comment.