This commit is contained in:
Executable
+54
@@ -0,0 +1,54 @@
|
||||
# SQLite version 3.x
|
||||
# gem install sqlite3
|
||||
#
|
||||
# Ensure the SQLite 3 gem is defined in your Gemfile
|
||||
# gem 'sqlite3'
|
||||
<% 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 %>
|
||||
|
||||
development:
|
||||
<% if ENV["DATABASE_URL"] %>
|
||||
url: <%= ENV["DATABASE_URL"] %>
|
||||
<% else %>
|
||||
adapter: sqlite3
|
||||
database: db/development.sqlite3
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
<% end %>
|
||||
|
||||
mysql:
|
||||
adapter: mysql2
|
||||
database: development_railsgoat
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
host: localhost
|
||||
username: root
|
||||
password:
|
||||
|
||||
# Warning: The database defined as "test" will be erased and
|
||||
# re-generated from your development database when you run "rails".
|
||||
# Do not set this db to the same as development or production.
|
||||
test:
|
||||
adapter: sqlite3
|
||||
database: db/test.sqlite3
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
|
||||
production:
|
||||
adapter: sqlite3
|
||||
database: db/production.sqlite3
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
|
||||
openshift:
|
||||
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"] %>
|
||||
Reference in New Issue
Block a user