Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save juniorb2ss/1bc2e1fc25c17f7b03262a735d063d3a to your computer and use it in GitHub Desktop.

Select an option

Save juniorb2ss/1bc2e1fc25c17f7b03262a735d063d3a to your computer and use it in GitHub Desktop.

Revisions

  1. juniorb2ss created this gist Jul 4, 2016.
    40 changes: 40 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    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"