So, I'm enjoying using the hackathon Magento Composer installer, but I'm struggling to understand how others use it in relation to a deployment service. Currently I'm using DeployHQ, and yes, I can set it to deploy and run composer when there is an update to the repo, but this doesn't make sense to me now.
My main composer repo, containing just the json file of all of the packages I want to include in my build, only gets updated when I add a new package to the list.
When I update my theme, or custom extension (which is referenced in the json file), there is no "hook" to update my deployment service. So I have to log in to my server and manually run composer (which takes the site down until it's finished).
So how do others manage this? Should I only run composer locally and include the vendor folder in my repo?
Any answers would be greatly appreciated.
Best Answer
I have set up a structure at our agency that allows us to use Composer to deploy all our Magento sites. This might be a bit of overkill for the question you asked but here's a basic overview of the structure anyway:
Repository structure
Below is the folder structure of the 'parent' repository. It contains the composer JSON and lock files and other configuration required for deployment.
code/magento
)index.php
and other folders like media and errors sit inside a public folder outside of the Magento rootDeployment
composer install
during the build and deploys all modules into the Magento submodule.This is still not a continuous integration setup but I find it works well for Magento sites. Feel free to send me a message if you'd like some more advice that's specific to your setup.