Skip to content

Instantly share code, notes, and snippets.

@rafaelrpbelo
Last active February 26, 2019 01:30
Show Gist options
  • Save rafaelrpbelo/ae2f4186e639b7a543b921dffe89ab06 to your computer and use it in GitHub Desktop.
Save rafaelrpbelo/ae2f4186e639b7a543b921dffe89ab06 to your computer and use it in GitHub Desktop.
[Rails] Default config/database.yml
default: &default
adapter: postgresql
encoding: utf8
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
host: <%= ENV.fetch('DB_HOST', '127.0.0.1') %>
username: <%= ENV.fetch('DB_USER', 'postgres') %>
password: <%= ENV['DB_PASSWORD'] %>
development:
<<: *default
database: your_database_development
test:
<<: *default
database: your_database_test
production:
<<: *default
url: <%= ENV["DATABASE_URL"] %>
sslmode: require
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment