Put database.yml into the code base
It works by default, we have a mechanism to configure it (dotenv.example) and we want to be a 12factor app, right? Let's do this...
This commit is contained in:
parent
a0b79c7789
commit
f8b7233404
8 changed files with 22 additions and 55 deletions
32
config/database.yml
Normal file
32
config/database.yml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
<%
|
||||
encoding = 'unicode'
|
||||
if ENV['OSEM_DB_ADAPTER'] == 'mysql2'
|
||||
encoding = 'utf8'
|
||||
end
|
||||
%>
|
||||
|
||||
|
||||
default: &default
|
||||
adapter: <%= ENV['OSEM_DB_ADAPTER'] || 'postgresql' %>
|
||||
encoding: <%= encoding %>
|
||||
host: <%= ENV['OSEM_DB_HOST'] || 'database' %>
|
||||
port: <%= ENV['OSEM_DB_PORT'] || '5432' %>
|
||||
username: <%= ENV['OSEM_DB_USER'] || 'postgres' %>
|
||||
password: <%= ENV['OSEM_DB_PASSWORD'] || 'mysecretpassword' %>
|
||||
database: <%= ENV['OSEM_DB_NAME'] || 'postgres' %>
|
||||
pool: 5
|
||||
timeout: 5000
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
database: osem_development
|
||||
|
||||
# Warning: The database defined as "test" will be erased and
|
||||
# re-generated when you run "rake".
|
||||
# Do not set this db to the same as development or production.
|
||||
test:
|
||||
<<: *default
|
||||
database: osem_test
|
||||
|
||||
production:
|
||||
<<: *default
|
||||
Loading…
Add table
Add a link
Reference in a new issue