I've been touching Ruby for about half a year, and here are some commands that I often looked up. Since it is a beginner and first post, it would be encouraging if you could give us feedback in the comments and LGTM. Thank you.
Check the version of ruby
$ ruby -v
Check rails version
$ rails -v
credentials.yml.open enc file
$ EDITOR='code --wait' rails credentials:edit
(* To open a file with vscode, you need to install shell so that you can use the code command.)
Check the startup status
$ ps auxwww | grep unicorn
End the process
$ kill -9 ○○○○○○
Check all logs($ cd /var/www/app/at log)
$ less unicorn.staderr.log
Check the latest 10 logs($ cd /var/www/app/at log)
$ tail unicorn.staderr.log
restart
$ sudo service nginx restart
Check all logs(In the home directory of the production environment)
$ sudo less /var/log/nginx/error.log
Check the startup status
$ sudo service mysqld status
to start
$ sudo service mysqld start
Deploy execution
$ bundle exec cap production deploy
Roll back to the previous state
$ bundle exec cap production deploy:rollback
There are only commands around the production environment, but if there are excesses or deficiencies, we will update them as needed.
Recommended Posts