Reputation: 9191
I'm wondering, when deploying composer-based projects why most people advice to SSH into the server and install composer and download the dependancies as following:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
composer install
I don't see the difference from just copying the /vendor folder when you deploy. Do I miss anything?
Using GIT
When using GIT I can imagine that the /vendor folder is large and should be avoided. Is this the main reason?
Upvotes: 3
Views: 2318
Reputation: 41934
composer install
will install the dev dependencies, which is not something you want on your server. Because of that, you use composer install --no-dev
on your server.
This will reduce the amount of files on the server.
Upvotes: 3