Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. # TYPE DATABASE USER ADDRESS METHOD
  2.  
  3. # "local" is for Unix domain socket connections only
  4. local all username peer
  5. local myapp_dev myapp md5
  6. local myapp_test myapp md5
  7. local myapp_prod myapp md5
  8. #local all all peer
  9. # IPv4 local connections:
  10. host all all 127.0.0.1/32 md5
  11. # IPv6 local connections:
  12. host all all ::1/128 md5
  13. # Allow replication connections from localhost, by a user with the
  14. # replication privilege.
  15. #local replication postgres peer
  16. #host replication postgres 127.0.0.1/32 md5
  17. #host replication postgres ::1/128 md5
  18.  
  19. test:
  20.  
  21. adapter: postgresql
  22. database: myapp_test
  23. pool: 5
  24. timeout: 5000
  25. host: localhost
  26. username: username
  27. password:
  28.  
  29. sudo -u postgres pg_ctlcluster 9.3 main restart
  30.  
  31. peer
  32.  
  33. pg_hba.conf:
  34. # IPv4 local connections:
  35. host all all 127.0.0.1/32 trust
  36. # IPv6 local connections:
  37. host all all ::1/128 trust
  38.  
  39. default: &default
  40. adapter: postgresql
  41. encoding: unicode
  42. pool: 5
  43. host: localhost
  44. username: your_user
  45. password: your_password
  46.  
  47. development:
  48. <<: *default
  49. database: your_db_development
  50.  
  51. test:
  52. <<: *default
  53. database: your_db_test
  54.  
  55. production:
  56. url: <%= ENV['DATABASE_URL'] %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement