From 12201c47617189552203fda5444b1b1ca8c9541e Mon Sep 17 00:00:00 2001 From: buttercat1791 Date: Wed, 25 Feb 2026 08:25:16 -0600 Subject: [PATCH] Use port 5432 for DB conn --- config/config.exs | 9 +++++++++ config/dev.exs | 2 +- config/prod.exs | 6 ++++++ config/test.exs | 2 +- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/config/config.exs b/config/config.exs index fe07fa4..adc7f6b 100644 --- a/config/config.exs +++ b/config/config.exs @@ -11,6 +11,15 @@ config :gc_index_relay, ecto_repos: [GcIndexRelay.Repo], generators: [timestamp_type: :utc_datetime] +config :gc_index_relay, GcIndexRelay.Repo, + username: System.get_env("POSTGRES_ADMIN_USER"), + password: System.get_env("POSTGRES_ADMIN_PASSWORD"), + database: System.get_env("POSTGRES_DB"), + hostname: System.get_env("POSTGRES_HOST"), + stacktrace: true, + show_sensitive_data_on_connection_error: true, + pool_size: 10 + # Configure the endpoint config :gc_index_relay, GcIndexRelayWeb.Endpoint, url: [host: "localhost"], diff --git a/config/dev.exs b/config/dev.exs index 3b616d1..d2f6b3a 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -2,7 +2,7 @@ import Config # Configure your database config :gc_index_relay, GcIndexRelay.Repo, - port: 5455, + port: 5432, username: "postgres", password: "postgres", hostname: "localhost", diff --git a/config/prod.exs b/config/prod.exs index 45d1bfb..c6890ea 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -1,5 +1,11 @@ import Config +config :gc_index_relay, GcIndexRelay.Repo, + url: System.get_env("DATABASE_URL"), + pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"), + ssl: true, + ssl_opts: [verify: :verify_none] + # Force using SSL in production. This also sets the "strict-security-transport" header, # known as HSTS. If you have a health check endpoint, you may want to exclude it below. # Note `:force_ssl` is required to be set at compile-time. diff --git a/config/test.exs b/config/test.exs index 67cdf17..5cb6f7c 100644 --- a/config/test.exs +++ b/config/test.exs @@ -8,7 +8,7 @@ config :gc_index_relay, :start_repo, true # to provide built-in test partitioning in CI environment. # Run `mix help test` for more information. config :gc_index_relay, GcIndexRelay.Repo, - port: 5455, + port: 5432, username: "postgres", password: "postgres", hostname: "localhost",