Kaynağa Gözat

Add host and port to DB connection config

master
Dylan Baker 8 ay önce
ebeveyn
işleme
d54a3e8beb
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2
    0
      db/connect.rb

+ 2
- 0
db/connect.rb Dosyayı Görüntüle

@@ -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…
İptal
Kaydet