Last Updated: February 25, 2016
·
2.4K
· n9ti

Setting Laravel Environment on AWS Elastic Beanstalk

1) Create a configuration file with the extension .config (e.g., myapp.config) and place it in an .ebextensions top-level directory of your source bundle.

.ebextensions/myapp.config

2) In the myapp.config file, type the following.

commands:
  01updateComposer:
    command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update

container_commands:
  composer:
    command: "/usr/bin/composer.phar update"

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/customize-containers.html#customize-containers-format

1 Response
Add your response

It's a common mistake to suggest running composer update to install dependencies—what you want is composer install, which will install exactly the current versions defined in the project's composer.lock. Running update will update all of your dependencies. You don't want to find out at production deployment time that a package you depend on has made a breaking API change in its latest version that you haven't tested yet.

over 1 year ago ·