Skip to content

Commit 1cd2133

Browse files
committed
chore: update database settings #118
1 parent 9617c01 commit 1cd2133

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

config/database.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@
1515
default: &default
1616
adapter: postgresql
1717
encoding: unicode
18+
host: <%= ENV.fetch('DATABASE_HOST') { 'localhost' } %>
19+
user: <%= ENV.fetch('DATABASE_USERNAME') { 'postgres' } %>
20+
password: <%= ENV.fetch('DATABASE_PASSWORD') { 'postgres' } %>
21+
port: <%= ENV.fetch('DATABASE_PORT') { 5432 } %>
1822
# For details on connection pooling, see Rails configuration guide
1923
# https://guides.rubyonrails.org/configuring.html#database-pooling
2024
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
2125

2226
development:
2327
<<: *default
24-
database: skillrx_development
28+
database: <%= ENV.fetch('DATABASE_NAME') { 'skillrx_development' } %>
2529

2630
# The specified database role being used to connect to PostgreSQL.
2731
# To create additional roles in PostgreSQL see `$ createuser --help`.
@@ -55,7 +59,7 @@ development:
5559
# Do not set this db to the same as development or production.
5660
test:
5761
<<: *default
58-
database: skillrx_test
62+
database: <%= ENV.fetch('DATABASE_TEST_NAME') { 'skillrx_test' } %>
5963

6064
# As with config/credentials.yml, you never want to store sensitive information,
6165
# like your database password, in your source code. If your source code is

0 commit comments

Comments
 (0)