-
-
Notifications
You must be signed in to change notification settings - Fork 33
/
NOTES
34 lines (27 loc) · 1.09 KB
/
NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
production:
<<: *default
adapter: postgresql
encoding: unicode
database: <%= ENV['RDS_DB_NAME'] %>
username: <%= ENV['RDS_USERNAME'] %>
password: <%= ENV['RDS_PASSWORD'] %>
host: <%= ENV['RDS_HOSTNAME'] %>
port: <%= ENV['RDS_PORT'] %>
# Raspberry PI
# https://hackaday.io/project/27725-smart-lock-with-web-interface/log/72083-update-7-ruby-on-rails-install-and-configuration
# Deploy Changes:
# Source: https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/nginx/oss/deploy_updates.html
ssh -i <keyfile> ubuntu@<domain>
cd /var/www/<app>
git pull origin master
bundle install --deployment --without development test
bundle exec rake assets:precompile db:migrate RAILS_ENV=production
bundle clean # Optional, clean up old gem versions
passenger-config restart-app $(pwd)
## DB Backup and Restore
pg_dump ubuntu > dumpfile
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
psql ubuntu < dumpfile
## Debugging, might need to re-enable logs due to rotation: https://www.phusionpassenger.com/library/admin/nginx/log_rotation.html
passenger-config reopen-logs