- I have a local Dev environment and installed Magento 2 using composer
- I initialized the local /magneto2/folder as a Git repo
- I added this .gitignore file to the root of my /magneto2/folder
- I have a remote repo ready to use on Beanstalk
From the Beanstalk remote repo I want to deploy the code to the Staging server
- What are the steps now to deploy all my files to the Staging server (through the Beanstalk remote repo)?
- How do I setup my Magento 2 site on the Staging server with correct database settings etc?
1 Answer 1
Beanstalk doesn't handle composer deployments.
The guys at beanstalk created deploybot to handle composer deployments.
If you want automatic deployments for staging you need to go to beanstalk> integrations> Modular Webhooks and add there the deploybot webhook.
 answered Jun 1, 2016 at 14:14
 
 
 
 Claudiu Creanga 
 
 6,2872 gold badges53 silver badges90 bronze badges
 
 - 
 I am confused now. What are composer deployments exactly? The only thing I want is: 1) have my code locally so I have my local development environment. 2) I am able to upgrade Magento locally 3) Magento files are in my local Git repository 4) I develop and create my theme locally and push changes to the Beanstalk remote repo. 5) from the Beanstalk remote repo I want to pull the code into Staging. But a lot of files are ignored by .gitignore. How do I get all my files on Staging server and after successful setup, how do I pull in only changes for custom theme and upgrades etc?meez– meez2016年06月01日 16:46:22 +00:00Commented Jun 1, 2016 at 16:46
- 
 @MeesFrenkelFrank magento2 uses code generation so you shouldn't track certain folders, but instead run magento commands to generate those files. composer does not recommend tracking the vendor folder because it will lead to possible errors with packages. tl;dr if you want to hack it you can just remove the .gitignore, track everything and push to beanstalk. it will be painfully slow, but it will work. but that is not recommended. you cannot have the same workflow as in mage1 because mage2 is built differently.Claudiu Creanga– Claudiu Creanga2016年06月01日 20:48:28 +00:00Commented Jun 1, 2016 at 20:48
- 
 Thanks. So in other words; I have to do the same install with composer first on my Staging server usingcomposer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <installation directory name>. Or does that not work on Shared hosting server? Or can I also alternatively just crab the archive and extract the files on the server and run the setup there? Like in this tutorial?meez– meez2016年06月02日 04:37:45 +00:00Commented Jun 2, 2016 at 4:37
- 
 
- 
 1@MeesFrenkelFrank magento.stackexchange.com/questions/102144/… while you're running a composer install and deploy your site will be down. that's why with composer it is good to run them in a container and then symlink the folder. that's what deploybot does, but can be done with other tools like capistranoClaudiu Creanga– Claudiu Creanga2016年06月02日 12:57:52 +00:00Commented Jun 2, 2016 at 12:57
Explore related questions
See similar questions with these tags.
default