Browse Source

Add host and port to DB connection config

master
Dylan Baker 8 months ago
parent
commit
d54a3e8beb
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      db/connect.rb

+ 2
- 0
db/connect.rb View File

7
 DB =
7
 DB =
8
   Sequel.connect(
8
   Sequel.connect(
9
     adapter: :postgres,
9
     adapter: :postgres,
10
+    host: ENV['DB_HOST'] || 'localhost',
10
     database: ENV['DB_DATABASE'],
11
     database: ENV['DB_DATABASE'],
11
     user: ENV['DB_USERNAME'],
12
     user: ENV['DB_USERNAME'],
12
     password: ENV['DB_PASSWORD'],
13
     password: ENV['DB_PASSWORD'],
14
+    port: ENV['DB_PORT'] || 5432,
13
     logger: ENV['APP_ENV'] == 'development' ? Logger.new('db/log') : nil
15
     logger: ENV['APP_ENV'] == 'development' ? Logger.new('db/log') : nil
14
   )
16
   )

Loading…
Cancel
Save