Skip to content

Instantly share code, notes, and snippets.

@scrubmx
Created March 9, 2015 02:10
Show Gist options
  • Save scrubmx/bdc51b990167a21dbacf to your computer and use it in GitHub Desktop.
Save scrubmx/bdc51b990167a21dbacf to your computer and use it in GitHub Desktop.
Laravel 5 AWS elastic beanstalk post deploy configuration file.
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
@buluxan
Copy link

buluxan commented Jun 1, 2016

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

@evendrop
Copy link

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