A recipe (tasklist) for deploying simple Magento 2 projects with the help of deployer.
Deployer tool user so called recipes: sets of commands implemented in PHP - for executing specific tasks. One of the possible tasks is deployment of Magento 2 with minimal downtime.
In order to be able to use the recipe deployer must be installed either directly or with composer.
Supported versions:
- Magento:
>2.2
- PHP:
>7.0
- n98-magerun2 (recommended):
>2.0
The configuration (hosts.yml
) and execution file (deploy.php
) are projects specific and should be added to the project VCS.
It's recommended to add this recipe with composer. In case you want to add some more tasks or change existing ones
in the recipe (magento2.php
) you can do it deploy.php
ode include more files.
Or it even might make sense to add the recipe file to VCS and make it project-specific as well.
After setting up the tool can be used like this (in project root):
vendor/bin/dep deploy test
In case something happened the task remains locked and can be unlocked as follows:
vendor/bin/dep deploy:unlock test
Subtasks can also be executed separately, for example:
vendor/bin/dep magento:db:dump test
Note, that in case you've changed the configuration you have to make sure that it is updated in document root (e.g. git pull
) before starting the deployment, otherwise the deployment will be run with the previous configuration.
The recipe's main task (deploy
) is implemented similar to the official Magento 2 Pipeline deployment.
The main differences here are:
- project is build on the same server (1)
- it requires the DB connection (2)
Both of them are made for simplification: there is no need for a special build server (1) and there is no need to maintain config.php
(2)
Oleh Kravets oleh@openstream.ch
Website: openstream.ch
MIT License (see: License file)