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

Loading…
Cancel
Save