Published 02 Apr 2015
Requirement: Magento, Composer, Magento Composer Installer
Well, I currently have a situation where nothing much can be done with the deployment process. Current deployment process is pulling file from a GIT, that’s it; so running
composer update on production environment is a no-go.
Given this situation, I have to come up with my own workflow. This might not be perfect, so ideas are welcome.
We will keep the same 1 to 4 steps. However, I’m skeptical to committing the whole vendor folder as some of them are not contributing that much to the whole Magento system (except for my own module). With that in mind, I excluded these by putting them into .gitignore
vendor/composer vendor/bin vendor/eloquent vendor/icecave vendor/justinrainbow vendor/magento-hackathon vendor/autoload.php
So if you do a GIT status check on your Magento repo, you shouldn’t see any modified file except for maybe composer.json and composer.lock.
Now, to deploy your newly developed module into this Magento, run
composer update --prefer-dist
This is to make sure composer will pull the repo without .git so the whole module will belong to your Magento repo.
Upon running this, GIT status should show your module in vendor and the symlinks in their corresponding position.
composer update --prefer-distin your Magento workspace to pull your updated module