Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # TYPE DATABASE USER ADDRESS METHOD
- # "local" is for Unix domain socket connections only
- local all username peer
- local myapp_dev myapp md5
- local myapp_test myapp md5
- local myapp_prod myapp md5
- #local all all peer
- # IPv4 local connections:
- host all all 127.0.0.1/32 md5
- # IPv6 local connections:
- host all all ::1/128 md5
- # Allow replication connections from localhost, by a user with the
- # replication privilege.
- #local replication postgres peer
- #host replication postgres 127.0.0.1/32 md5
- #host replication postgres ::1/128 md5
- test:
- adapter: postgresql
- database: myapp_test
- pool: 5
- timeout: 5000
- host: localhost
- username: username
- password:
- sudo -u postgres pg_ctlcluster 9.3 main restart
- peer
- pg_hba.conf:
- # IPv4 local connections:
- host all all 127.0.0.1/32 trust
- # IPv6 local connections:
- host all all ::1/128 trust
- default: &default
- adapter: postgresql
- encoding: unicode
- pool: 5
- host: localhost
- username: your_user
- password: your_password
- development:
- <<: *default
- database: your_db_development
- test:
- <<: *default
- database: your_db_test
- production:
- url: <%= ENV['DATABASE_URL'] %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement