Created
March 9, 2015 02:10
-
-
Save scrubmx/bdc51b990167a21dbacf to your computer and use it in GitHub Desktop.
Laravel 5 AWS elastic beanstalk post deploy configuration file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commands: | |
composer_update: | |
command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update | |
option_settings: | |
- namespace: aws:elasticbeanstalk:application:environment | |
option_name: COMPOSER_HOME | |
value: /root | |
container_commands: | |
01-install_composer: | |
command: "curl -s http://getcomposer.org/installer | php" | |
cwd: "/var/app/ondeck" | |
02-install_dependencies: | |
command: "php composer.phar install" | |
cwd: "/var/app/ondeck" | |
03-cleanup_composer: | |
command: "rm -Rf composer.*" | |
cwd: "/var/app/ondeck" | |
04-artisan_migrate: | |
command: "php artisan migrate --force" | |
cwd: "/var/app/ondeck" | |
leader_only: true |
why do you need to install the composer? and not only update it. as composer is installed(outdated, yes) in the eb AMI
I agree with spawn-guy. I don't see why you should install composer again in the root of the project, install vendor files, then delete composer when you already updated the composer.phar file in your first command. I think you would just call php /usr/bin/composer.phar install as a container command (and php artisan migrate if you need it of course).
sorry for the out of topic
can we use this config for 2 machine for example staging and production and
do u know how to put the .env.staging and .env.production during post deployment from elasticbeanstalk in root directory
Good job! very useful, even for latest lumen.
Thanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the root of your project create a ".ebextensions" directory and add this file inside.