Skip to content

Commit

Permalink
Prepare the application to deploy to Amazon's Elastic Beanstalk
Browse files Browse the repository at this point in the history
  • Loading branch information
egedemirci committed Nov 9, 2024
1 parent 7aea131 commit b9623dd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .ebextensions/01_install_dependencies.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
commands:
install_nodejs:
command: |
curl --silent --location https://rpm.nodesource.com/setup_14.x | bash -
yum install -y nodejs
install_yarn:
command: |
curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo
yum install -y yarn
4 changes: 4 additions & 0 deletions .ebextensions/10_nginx_add_packs.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
commands:
add_packs_location_to_nginx:
command: |
grep packs /opt/elasticbeanstalk/config/private/nginx/webapp.conf || sed -i '$a\\nlocation /packs {\n alias /var/app/current/public/packs;\n gzip_static on;\n gzip on;\n expires max;\n add_header Cache-Control public;\n}' /opt/elasticbeanstalk/config/private/nginx/webapp.conf
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: bundle exec puma -C /opt/elasticbeanstalk/config/private/pumaconf.rb
8 changes: 5 additions & 3 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ test:
#
production:
<<: *default
database: rails_to_riches_production
username: rails_to_riches
password: <%= ENV["RAILS_TO_RICHES_DATABASE_PASSWORD"] %>
database: <%= ENV['RDS_DB_NAME'] %>
host: <%= ENV['RDS_HOSTNAME'] %>
password: <%= ENV['RDS_PASSWORD'] %>
port: <%= ENV['RDS_PORT'] %>
username: <%= ENV['RDS_USERNAME'] %>

0 comments on commit b9623dd

Please sign in to comment.