Skip to content

Instantly share code, notes, and snippets.

View OleksandrPoltavets's full-sized avatar
🇺🇦
🇧🇪🇪🇺🇺🇸

Alex Poltavets OleksandrPoltavets

🇺🇦
🇧🇪🇪🇺🇺🇸
  • Brussels, Belgium
  • 15:21 (UTC +02:00)
View GitHub Profile
@OleksandrPoltavets
OleksandrPoltavets / 1 Gist conventions
Created December 23, 2016 11:39 — forked from PavloBezpalov/1 Gist conventions
Deploy Rails 5.0.0.beta3 to VPS(Ubuntu 14.04.4 LTS). Nginx, Puma, Capistrano3, PostgreSQL, RVM.
<<APP>> change this variables
  1. Add gem 'rails_12factor' to your Gemfile. This will add error logging and the ability for your app to serve static assets.
  2. bundle
  3. Run RAILS_ENV=production rake db:create db:migrate db:seed
  4. Run rake secret and copy the output
  5. From the command line: export SECRET_KEY_BASE=output-of-rake-secret
  6. To precompile your assets, run rake assets:precompile. This will create a folder public/assets that contains all of your assets.
  7. Run RAILS_ENV=production rails s and you should see your app.

Remember to clobber your assets (rake assets:clobber) and re-precompile (rake assets:precompile) if you make changes.

@OleksandrPoltavets
OleksandrPoltavets / configure-ec2-instance.md
Created April 23, 2024 17:53 — forked from linuxdevops-34/configure-ec2-instance.md
Complete guide for deploying rails application to aws ec2 instance, using capistrano as deploying tool with nginx & puma server

Deploy Rails Application to AWS EC2

Creating AWS EC2 Instance

- login to 'AWS Management Console' (https://aws.amazon.com/console/)
- from 'Services'(in navbar) choose 'EC2'
- from 'Create Instance' section, click on 'Launch Instance'
- then select 'AMI' (Amazon Machine Image), we will be using 'Ubuntu Server 16.04 LTS (HVM)' as example
- select 'Instance Type' as per your requirement
- then click 'Next:Configure Instance Details' to continue
  change 'Configure Instance Details' or used as default settings