Skip to content

Commit f207981

Browse files
committed
updated database sample
1 parent cbab104 commit f207981

1 file changed

Lines changed: 23 additions & 14 deletions

File tree

config/database.yml.sample

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
1-
defaults: &defaults
2-
adapter: <%= ENV.fetch('DB_ADAPTER', 'postgresql') %>
3-
encoding: <%= ENV.fetch('DB_ADAPTER', 'postgresql') == 'mysql2' ? 'utf8mb4' : '' %>
4-
pool: <%= ENV.fetch('DB_POOL_SIZE', 16) %>
5-
host: <%= ENV.fetch('DB_HOST', 'localhost') %>
6-
port: <%= ENV.fetch('DB_PORT', '5432') %>
7-
database: <%= ENV.fetch('DB_NAME', 'roadmap') %>
8-
username: <%= Rails.application.credentials.dig(:database, :username) %>
9-
password: <%= Rails.application.credentials.dig(:database, :password) %>
10-
1+
production:
2+
adapter: postgresql
3+
encoding: utf8
4+
host: db
5+
database: <%= ENV['DB_NAME'] %>
6+
username: <%= ENV['DB_USERNAME'] %>
7+
password: <%= ENV['DB_PASSWORD'] %>
8+
pool: <%= ENV['DB_POOL'] %>
9+
staging:
10+
adapter: postgresql
11+
encoding: utf8
12+
host: db
13+
database: <%= ENV['DB_NAME'] %>
14+
username: <%= ENV['DB_USERNAME'] %>
15+
password: <%= ENV['DB_PASSWORD'] %>
16+
pool: <%= ENV['DB_POOL'] %>
1117
development:
12-
<<: *defaults
13-
14-
test:
15-
<<: *defaults
18+
adapter: postgresql
19+
encoding: utf8
20+
host: db
21+
database: <%= ENV['DB_NAME'] %>
22+
username: <%= ENV['DB_USERNAME'] %>
23+
password: <%= ENV['DB_PASSWORD'] %>
24+
pool: <%= ENV['DB_POOL'] %>

0 commit comments

Comments
 (0)