From fd8ce1b32a2219714acf71be1fa5985fa8b57c2d Mon Sep 17 00:00:00 2001 From: Mohamed Halat Date: Mon, 26 Feb 2024 06:44:07 -0500 Subject: [PATCH] chore: add ability to change DB_PORT from standard 5432 (#480) --- .env.example | 1 + config/database.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.env.example b/.env.example index e1a1548e..acf9f1cd 100644 --- a/.env.example +++ b/.env.example @@ -26,5 +26,6 @@ TLS=true # Database Configuration DB_HOST=localhost +DB_PORT=5432 POSTGRES_PASSWORD=postgres POSTGRES_USER=postgres \ No newline at end of file diff --git a/config/database.yml b/config/database.yml index c718f1f7..ac8bfe3e 100644 --- a/config/database.yml +++ b/config/database.yml @@ -19,6 +19,7 @@ default: &default # https://guides.rubyonrails.org/configuring.html#database-pooling pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> host: <%= ENV.fetch("DB_HOST") { "127.0.0.1" } %> + port: <%= ENV.fetch("DB_PORT") { "5432" } %> password: <%= ENV.fetch("POSTGRES_PASSWORD") { nil } %> user: <%= ENV.fetch("POSTGRES_USER") { nil } %>