ssh-keygen -t rsa
Once you have entered the Gen Key command, you will get a few more questions:
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)#login | |
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"user":{"email":"<email>","password":"<passwd>"}}' http://localhost:3000/api/v1/sign_in.json | |
#logout | |
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X DELETE http://localhost:3000/api/v1/sign_out.json?auth_token=<token> |
#Goal Deploy your Rails App super easily with Dokku on Digital Ocean cheap cheap!
##Notes
Procfile
with the command to start up your application serverLogentries
(not in this guide)AppSignal
or New Relic
(not in this guide)HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
Spree API Server Needs | |
- Easy Setup & Deployment (Dokku) | |
- New Relic | |
- Error Monitoring (Raven) | |
- Performance Monitoring (Skylight) | |
- Logging (Loggly or Logentries?) | |
- SSL (Dokku handles this) | |
- Database Backups (http://donpottinger.net/blog/2014/11/22/bye-bye-heroku-hello-dokku-part-2.html (See Clockwork section)) | |
- Caching (Memcached + Dalli) | |
- Worker (Sidekiq) |
Quando ocorrer esse erro: | |
altere: | |
# /etc/sysctl.conf | |
e acrescente as linhas: | |
net.ipv6.conf.all.disable_ipv6 = 1 | |
net.ipv6.conf.default.disable_ipv6 = 1 | |
net.ipv6.conf.lo.disable_ipv6 = 1 |
source "https://rubygems.org" | |
ruby "2.2.2" | |
gem "rails", "4.2.0" | |
group :development do | |
gem "foreman" | |
gem "guard-livereload", require: false | |
gem "rack-livereload" | |
end |
set