jeudi 29 mai 2014

php - déployer l'application symfony2.1 avec Amazon Elastic Beanstalk - Stack Overflow


I have an environment in Amazon (Container Type: 64bit Amazon Linux running PHP 5.4) and I follow this instructions to deploy Symfony2 applications: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP_symfony2.html.


All is working properly but my problem is that Amazon automatically update and download the dependencies of my project (composer.json) when I deploy, but I don't want this issue because some updates can crash the application and I want to controll this.


There is a choice? I'm thinking to delete the vendor folder from my gitignore file(UPDATE: I tried this and didn't work, :-()... this should work? Which is the best way?


Thanks a lot!




It runs composer.phar install on every deploy. If you put your composer.lock file into your repository and don't change it, nothing will be installed on your server. Beside that if you want to update your dependencies, first install them on your local/deployment machine and if everything is fine push your composer.lock file as well.




You can control the version that gets download with composer.


http://getcomposer.org/doc/01-basic-usage.md#package-versions



I have an environment in Amazon (Container Type: 64bit Amazon Linux running PHP 5.4) and I follow this instructions to deploy Symfony2 applications: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_PHP_symfony2.html.


All is working properly but my problem is that Amazon automatically update and download the dependencies of my project (composer.json) when I deploy, but I don't want this issue because some updates can crash the application and I want to controll this.


There is a choice? I'm thinking to delete the vendor folder from my gitignore file(UPDATE: I tried this and didn't work, :-()... this should work? Which is the best way?


Thanks a lot!



It runs composer.phar install on every deploy. If you put your composer.lock file into your repository and don't change it, nothing will be installed on your server. Beside that if you want to update your dependencies, first install them on your local/deployment machine and if everything is fine push your composer.lock file as well.



You can control the version that gets download with composer.


http://getcomposer.org/doc/01-basic-usage.md#package-versions


0 commentaires:

Enregistrer un commentaire