-
Launch New EC2 Instance in AWS console
-
Define Security Groups
Include public ip addr as custom tcp rule for security group
-
Skip all steps and Launch
-
Download New Pem file or use previous pem file
-
chmod 400 Pem file
-
ssh into machine by running
ssh -i ~/directory-of-pem-file/pemfile ec2user@public ip address of launched instance
-
Prepare the Newly Launched Machine's System
-
run
sudo yum install -y curl gpg gcc gcc-c++ make
-
run
sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
-
run
curl -sSL https://get.rvm.io | sudo bash -s stable
-
run
sudo usermod -a -G rvm `whoami`
-
run
if sudo grep -q secure_path /etc/sudoers; then sudo sh -c "echo export rvmsudo_secure_path=1 >> /etc/profile.d/rvm_secure_path.sh" && echo Environment variable installed; fi
-
run
rvm install ruby
run
rvm --default use ruby
-
run
rvm install ruby-X.X.X
run
rvm --default use ruby-X.X.X
-
run
gem install bundler --no-rdoc --no-ri
-
run
sudo yum install -y epel-release
-
run
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
run
curl --silent --location https://rpm.nodesource.com/setup_9.x | sudo bash -
-
run
sudo yum install gcc-c++ make
-
run
sudo yum install -y --enablerepo=epel nodejs npm
-
run
sudo wget https://dl.yarnpkg.com/rpm/yarn.repo -O /etc/yum.repos.d/yarn.repo
-
run
sudo yum install yarn
-
run
sudo yum upgrade
run
sudo yum instal git
-
run
git clone __cloned_repo_url__
-
run
cd __name_of_cloned_repo__
run
bundle install
-
run
bundle update
-
run
npm install || yarn instal
-
Add ENV VARS via VIM
-
run
bundle exec ./bin/webpack
run
rails s
-
run
bundle exec ./bin/webpack
run
screen rails s
run
ctrl + A + D
to keep screen running but detach yourself from itrun
screen -r
to view all running screen instance
Alex1100/rails-5.x_deployment-guide
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
STEPS TO DEPLOY RAILS APP WITH AWS EC2 REDHAT/AMAZON LINUX CONTAINER INSTANCE
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published