Permalink
Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up| # PostgreSQL. Versions 8.2 and up are supported. | |
| <% user = ENV.key?("POSTGRESQL_ADMIN_PASSWORD") ? "root" : ENV["POSTGRESQL_USER"] %> | |
| <% password = ENV.key?("POSTGRESQL_ADMIN_PASSWORD") ? ENV["POSTGRESQL_ADMIN_PASSWORD"] : ENV["POSTGRESQL_PASSWORD"] %> | |
| <% db_service = ENV.fetch("DATABASE_SERVICE_NAME","").upcase %> | |
| default: &default | |
| adapter: postgresql | |
| encoding: unicode | |
| # For details on connection pooling, see rails configuration guide | |
| # http://guides.rubyonrails.org/configuring.html#database-pooling | |
| pool: <%= ENV["POSTGRESQL_MAX_CONNECTIONS"] || 5 %> | |
| username: <%= user %> | |
| password: <%= password %> | |
| host: <%= ENV["#{db_service}_SERVICE_HOST"] %> | |
| port: <%= ENV["#{db_service}_SERVICE_PORT"] %> | |
| database: <%= ENV["POSTGRESQL_DATABASE"] %> | |
| development: | |
| <<: *default | |
| test: | |
| adapter: sqlite3 | |
| database: db/test.sqlite3 | |
| pool: 5 | |
| timeout: 5000 | |
| production: | |
| <<: *default | |
| #database: blog_production | |
| #username: myapp | |
| #password: <%= ENV['MYAPP_DATABASE_PASSWORD'] %> | |
| #host: | |
| #port: |