Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save iiewad/35edf0a6b4d7b6ba7915df9fa65e41eb to your computer and use it in GitHub Desktop.

Select an option

Save iiewad/35edf0a6b4d7b6ba7915df9fa65e41eb to your computer and use it in GitHub Desktop.

Revisions

  1. @lettergram lettergram revised this gist Dec 4, 2019. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion fix_elasticbeanstalk_for_rails6.config
    Original file line number Diff line number Diff line change
    @@ -42,7 +42,7 @@ commands:
    command: "chown webapp:webapp -R /var/app/ondeck/"
    ignoreErrors: true
    16_chown_current:
    command: "chmod 0755 -R /var/app/ondeck/"
    command: "chmod 0644 -R /var/app/ondeck/"
    ignoreErrors: true

    container_commands:
  2. @lettergram lettergram revised this gist Dec 4, 2019. 1 changed file with 40 additions and 12 deletions.
    52 changes: 40 additions & 12 deletions fix_elasticbeanstalk_for_rails6.config
    Original file line number Diff line number Diff line change
    @@ -3,25 +3,53 @@ commands:
    01_install_yarn:
    command: "sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo && curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - && sudo yum install yarn -y"
    02_download_nodejs:
    command: curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
    command: "curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -"
    03_install_nodejs:
    command: yum -y install nodejs
    command: "yum -y install nodejs"
    04_mkdir_webapp_dir:
    command: mkdir /home/webapp
    command: "mkdir /home/webapp"
    ignoreErrors: true
    05_chown_webapp_dir:
    command: chown webapp:webapp /home/webapp
    command: "chown webapp:webapp /home/webapp"
    ignoreErrors: true
    06_chmod_webapp_dir:
    command: chmod 700 /home/webapp
    command: "chmod 0744 /home/webapp"
    ignoreErrors: true
    07_update_bundler:
    command: gem update bundler
    07_chmod_logs:
    command: "chown webapp:webapp -R /var/app/current/log/"
    ignoreErrors: true

    08_create_log_file:
    command: "touch /var/app/current/log/production.log"
    ignoreErrors: true
    09_chown_log_production:
    command: "chown webapp:webapp /var/app/current/log/production.log"
    ignoreErrors: true
    10_chmod_log_dir:
    command: "chmod 0664 -R /var/app/current/log/"
    ignoreErrors: true
    11_update_bundler:
    command: "gem update bundler"
    ignoreErrors: true
    12_config_for_update_nokogiri:
    command: "bundle config build.nokogiri --use-system-libraries"
    13_chown_current:
    command: "chown webapp:webapp -R /var/app/current/"
    ignoreErrors: true
    14_chmod_current:
    command: "chmod 0755 -R /var/app/current/"
    ignoreErrors: true
    15_chown_current:
    command: "chown webapp:webapp -R /var/app/ondeck/"
    ignoreErrors: true
    16_chown_current:
    command: "chmod 0755 -R /var/app/ondeck/"
    ignoreErrors: true

    container_commands:

    08_install_webpack:
    command: npm install --save-dev webpack
    09_precompile:
    command: bundle exec rake assets:precompile
    17_install_webpack:
    command: "npm install --save-dev webpack"
    18_config_for_update_nokogiri:
    command: "bundle config build.nokogiri --use-system-libraries"
    19_precompile:
    command: "bundle exec rake assets:precompile"
  3. @lettergram lettergram revised this gist Nov 8, 2019. 1 changed file with 14 additions and 2 deletions.
    16 changes: 14 additions & 2 deletions fix_elasticbeanstalk_for_rails6.config
    Original file line number Diff line number Diff line change
    @@ -6,10 +6,22 @@ commands:
    command: curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
    03_install_nodejs:
    command: yum -y install nodejs
    04_mkdir_webapp_dir:
    command: mkdir /home/webapp
    ignoreErrors: true
    05_chown_webapp_dir:
    command: chown webapp:webapp /home/webapp
    ignoreErrors: true
    06_chmod_webapp_dir:
    command: chmod 700 /home/webapp
    ignoreErrors: true
    07_update_bundler:
    command: gem update bundler
    ignoreErrors: true

    container_commands:

    04_install_webpack:
    08_install_webpack:
    command: npm install --save-dev webpack
    05_precompile:
    09_precompile:
    command: bundle exec rake assets:precompile
  4. @lettergram lettergram revised this gist Nov 3, 2019. 1 changed file with 3 additions and 19 deletions.
    22 changes: 3 additions & 19 deletions fix_elasticbeanstalk_for_rails6.config
    Original file line number Diff line number Diff line change
    @@ -1,31 +1,15 @@
    commands:

    01_install_yarn:
    command: "sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo &&\
    curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - && sudo yum inst\
    all yarn -y"
    command: "sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo && curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - && sudo yum install yarn -y"
    02_download_nodejs:
    command: curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
    03_install_nodejs:
    command: yum -y install nodejs

    04_mkdir_webapp_dir:
    command: mkdir /home/webapp
    ignoreErrors: true
    05_chown_webapp_dir:
    command: chown webapp:webapp /home/webapp
    ignoreErrors: true
    06_chmod_webapp_dir:
    command: chmod 700 /home/webapp
    ignoreErrors: true

    07_update_bundler:
    command: gem update bundler
    ignoreErrors: true

    container_commands:

    08_install_webpack:
    04_install_webpack:
    command: npm install --save-dev webpack
    09_precompile:
    05_precompile:
    command: bundle exec rake assets:precompile
  5. @lettergram lettergram renamed this gist Nov 3, 2019. 1 changed file with 6 additions and 4 deletions.
    Original file line number Diff line number Diff line change
    @@ -9,7 +9,6 @@ all yarn -y"
    03_install_nodejs:
    command: yum -y install nodejs


    04_mkdir_webapp_dir:
    command: mkdir /home/webapp
    ignoreErrors: true
    @@ -19,11 +18,14 @@ all yarn -y"
    06_chmod_webapp_dir:
    command: chmod 700 /home/webapp
    ignoreErrors: true
    07_update_bundler

    07_update_bundler:
    command: gem update bundler
    ignoreErrors: true

    container_commands:

    08_precompile:
    command: bundle exec rails assets:precompile
    08_install_webpack:
    command: npm install --save-dev webpack
    09_precompile:
    command: bundle exec rake assets:precompile
  6. @lettergram lettergram created this gist Nov 3, 2019.
    29 changes: 29 additions & 0 deletions fix_elasticbeanstalk_for_rails6.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    commands:

    01_install_yarn:
    command: "sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo &&\
    curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - && sudo yum inst\
    all yarn -y"
    02_download_nodejs:
    command: curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
    03_install_nodejs:
    command: yum -y install nodejs


    04_mkdir_webapp_dir:
    command: mkdir /home/webapp
    ignoreErrors: true
    05_chown_webapp_dir:
    command: chown webapp:webapp /home/webapp
    ignoreErrors: true
    06_chmod_webapp_dir:
    command: chmod 700 /home/webapp
    ignoreErrors: true
    07_update_bundler
    command: gem update bundler
    ignoreErrors: true

    container_commands:

    08_precompile:
    command: bundle exec rails assets:precompile