Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save zhuomingliang/e923744cca64acf46fdde787059e3adc to your computer and use it in GitHub Desktop.
Save zhuomingliang/e923744cca64acf46fdde787059e3adc to your computer and use it in GitHub Desktop.
Commands to ElasticBeanstalk
commands:
00_update_composer:
command: export HOME=/root && export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update
option_settings:
- namespace: aws:elasticbeanstalk:application:environment
option_name: COMPOSER_HOME
value: /root
- namespace: aws:elasticbeanstalk:application:environment
option_name: HOME
value: /root
container_commands:
01express:
command: "echo AWS Container Commands started, starting Composer install."
02installComposer:
command: "php /opt/elasticbeanstalk/support/composer.phar install --no-dev"
cwd: "/var/app/ondeck"
03express:
command: "echo Composer install completed, starting Laravel migration"
04storagepermissions:
command: "chmod -fR 755 /var/app/ondeck/storage"
05migrations:
command: "php artisan migrate --env=production --no-interaction"
cwd: "/var/app/ondeck"
ignoreErrors: true
06migrations_module:
command: "php artisan --env=production -n --force module:migrate"
cwd: "/var/app/ondeck"
ignoreErrors: true
07express:
command: "echo Completed Laravel migration, starting Laravel database seeding"
08seeds:
command: "php artisan db:seed --env=production --no-interaction"
cwd: "/var/app/ondeck"
leader_only: true
09express:
command: "echo Completed database seeting, Container Commands complete."
10optimize:
command: "/usr/bin/composer.phar dump-autoload --optimize --no-dev"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment