0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

git clone

Posted at

sasakiyuuya@mbp ~ % cd .ssh
sasakiyuuya@mbp .ssh % chmod 400 jojotech.pem
sasakiyuuya@mbp .ssh % ssh -i jojotech.pem ec2-user@54.249.7.206
[ec2-user@ip-10-0-8-195 ~]$ cd /var
[ec2-user@ip-10-0-8-195 var]$ sudo chmod 755 www
[ec2-user@ip-10-0-8-195 var]$ cd www/
[ec2-user@ip-10-0-8-195 www]$ sudo git clone https://github.com/jojo232/cloud9.git
[ec2-user@ip-10-0-8-195 cloud9]$ gem install bundler
[ec2-user@ip-10-0-8-195 ~]$ gem install rails -v 6.1.4
[ec2-user@ip-10-0-8-195 ~]$ cd /var/www/cloud9
[ec2-user@ip-10-0-8-195 cloud9]$ bundle install
[ec2-user@ip-10-0-8-195 cloud9]$ sudo chown -R ec2-user:ec2-user .

vim config/database.yml ←ファイル変更
production:
<<: *default
database: jojorion_production
username: admin
password: adminadmin
host: raistech-live8-2022-database-1.crsw7ysdmznk.ap-northeast-1.rds.amazonaws.com

[ec2-user@ip-10-0-8-195 cloud9]$bundle exec rails webpacker:install
[ec2-user@ip-10-0-8-195 cloud9]$EDITOR=vim bin/rails credentials:edit

↓ローカルフォルダーからマスターキーを引っ張ってくる

sasakiyuuya@mbp jojorion % cat config/master.key
24496010253b94a8ab64e93fe0257ccd
[ec2-user@ip-10-0-8-195 cloud9]$vim config/master.key
[ec2-user@ip-10-0-8-195 cloud9]$RAILS_ENV=poroduction bundle exec rails db:create
[ec2-user@ip-10-0-8-195 cloud9]$RAILS_ENV=poroduction bundle exec rails db:migrate
[ec2-user@ip-10-0-8-195 cloud9]$RAILS_ENV=poroduction bundle exec rails s -b 0.0.0.0

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?