AWS Elastic Beanstalk and Composer

十年热恋 提交于 2019-11-29 02:14:41

Composer is already installed default in Beanstalk's PHP AMI.

Also consider that container_commands are ran through '/var/app/ondeck' and not on current. Try something like this:

container_commands:
  01-install-packages:
    command: "composer.phar install -d /var/app/ondeck/www"
four43

Just a note, most of the PHP containers that AWS is using in Elastic Beanstalk are auto deploying by running composer.phar install now. You should be able to skip this step if you don't have a "vendors" folder present. If you want to run it manually, the above methods should work, but you should only need something like @kewubenduben mentioned.

If you are trying to access a private remote repository, check out the Q and A here: AWS Elastic Beanstalk using PHP with Private Composer Repositories , shameless plug.

Went with the suggestion provided by @tbjes and moved composer related files outside of my document root to the project root and after a quick test all appears to be working out of the box without having to run composer via .ebxtenstions config files.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!