Closed pdenissen closed 6 years ago
Hi @Hobbit78 ,
For me you have 2 key sites where to install this deployment tool (surely there are other options, I speak of the ones I have implemented):
You need install via composer composer require "jalogut/magento2-deployer-plus"
In this case you should follow the instructions of the Readme:
deploy.php
to root project and modify with your stages: ExplanationPROS
CONS
You need an artifact previously generated from your Magento. (<bin_dir>/dep build
)
composer.json
:
{
"name": "magento/deploy",
"description": "Deploy to Production/Dev/Staging Magento 2",
"type": "project",
"require": {
"jalogut/magento2-deployer-plus": "^1.0"
},
"minimum-stability": "stable"
}
composer install
deploy.php
to root project and modify/configure with your stages: Explanationartifacts
artifact.tar.gz
to folder artifacts
(previously generated from your Magento)PROS
CONS
Here you have my 5 cents of my experience with magento2-deployer-plus.
IMHO It is essential to have a CI/CD server to deploy magento, therefore, I recommend option 1.
@osrecio thank you very much for taking the time to clarify the different installation options.
@Hobbit78 I would also suggest you to go for option 1. You can deploy from your local or from a CI/CD system as you wish. Just be sure you have ssh
access to the server on the machine where you deploy from. You need that because deployer
will start executing actions on the server via ssh
when you execute the deployment commands.
For more general information about how deployer works, please see the deployer documentation here:
This tool is just a recipe with tailored tasks for Magento2 based on the deployer tool
Do I have to install this in the Magento root? Or outside the root?
You have to install it with composer. Then, the tool will be available on your vendor_dir
Where should the file deploy.php copied to?
The README.md
refers all actions to your project root. So you should have the deploy.php
file on your project root
Hi @Hobbit78
Did that help? If you do not have further questions, we might close this issue.
Hi Jalogut,
Hobbit78 here ;-)
Well haven't work it yet because lack of time. But the manual provided by @osrecio seems very clear. I think I can work from there. You can close the issue.
Thanks a lot. Very happy with it.
Sorry to respond to a closed ticket, but I'm also having trouble figuring out directory structure. Where does the Magento code go within this project? When working locally, for example, would it just go in a directory called magento? Where should the magento_dir
variable point to? Local or remote?
Hi @Ifolco, magento_dir
is the relative path to the folder containing the magento files from your project root. So if you place the magento installation directly in your project root, the value would be .
. However if you have magento code in a subdirectory, the value of magento_dir
has to be the name of this subdirectory.
Hi,
As a noob I try to figuring out how to install the deployment tool. Do I have to install this in the Magento root? Or outside the root?
It would be a little more clear if I know where to
cd
to. This also applies to the setup part. Where should the filedeploy.php
copied to?I hope you can make it a little more clear for noobs like me ;-)
Thank you in advanced!