--I'm writing an application in Rails --The initial settings of AWS have been completed, the EC2 instance etc. have been started, and the application has already been deployed. --The automatic deployment settings by Capistrano have been completed.
--Since you made changes locally to the created application, you want to reflect the changes in the production environment on AWS. --I always forget how to push AWS EC2, so I want to post it instead of a memorandum
Push local changes to the master branch on github
Log in to EC2
~ % cd .ssh .ssh % ssh -i example.pem ec2-user@Elastic IP of the application you want to update
[ec2-user@ip-○○○-○○-○○-○○ ~]$ cd /var/www/Application name
[ec2-user@ip-○○○-○○-○○-○○ Repository name]$ ps aux | grep unicorn ↓ 「unicorn master -Find the process ID with the letter c " ↓ [ec2-user@ip-○○○-○○-○○-○○ Repository name]$kill process ID ↓ Run exit to log out of your EC2 instance
Application name% bundle exec cap production deploy