Support custom database port through environment DATABASE_PORT env var

Based on example from https://github.com/elixir-ecto/ecto
This commit is contained in:
Marcus Vaal
2019-07-27 10:42:08 +02:00
committed by Adrian Kumpf
parent 9cff83afb7
commit 9bb1b446ea
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -13,6 +13,7 @@ config :teslamate, TeslaMate.Repo,
password: System.fetch_env!("DATABASE_PASS"),
database: System.fetch_env!("DATABASE_NAME"),
hostname: System.fetch_env!("DATABASE_HOST"),
port: System.get_env("DATABASE_PORT", "5432"),
pool_size: System.get_env("DATABASE_POOL_SIZE", "5") |> String.to_integer()
config :teslamate, TeslaMateWeb.Endpoint,