sergeypedan / rails-template

Collection of thing I have to copy-paste to my usual Rails projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

Connect to hosting

ssh root@$CODE2TRAVEL_IP

Go to project

cd "/var/www/code2travel.com/current"

Source chruby

source "/etc/profile.d/chruby.sh"

Precompile manually

bin/rails assets:precompile

Puma

Listen to logs

tail -f "/var/www/code2travel.com/shared/log/production.log"
tail -f "/var/www/code2travel.com/shared/log/puma.stdout.log"
tail -f "/var/www/code2travel.com/shared/log/puma.stderr.log"

tail -f "/var/www/code2travel.com/shared/log/sidekiq.log"

Start / stop

pumactl --config "/var/www/code2travel.com/current/config/puma/production.rb" stop
pumactl --config "/var/www/code2travel.com/current/config/puma/production.rb" start
pumactl --config "/var/www/code2travel.com/current/config/puma/production.rb" restart

NGINX

Check NGINX config

cat /etc/nginx/sites-enabled/code2travel.com

Status

systemctl status nginx
systemctl is-enabled nginx
systemctl is-active nginx
systemctl reload nginx
ps aux | grep nginx

Start / stop

systemctl start nginx
systemctl stop nginx
systemctl restart nginx

Listen to logs

tail -f "/var/log/nginx/access.log"
tail -f "/var/log/nginx/error.log"

Remove backups

rm -rf /var/www/code2travel.com/backups

Check which process are using ports

lsof -wni tcp:80
lsof -wni tcp:443
lsof -wni tcp:3000

About

Collection of thing I have to copy-paste to my usual Rails projects


Languages

Language:Ruby 46.4%Language:SCSS 33.1%Language:Sass 9.4%Language:Slim 7.5%Language:JavaScript 2.0%Language:HTML 1.5%Language:Procfile 0.0%Language:CoffeeScript 0.0%