diff --git a/README.md b/README.md index 91d36da0..9db75118 100644 --- a/README.md +++ b/README.md @@ -243,6 +243,7 @@ TeslaMate uses environment variables for runtime configuration. | DATABASE_PASS | User password (**required**) | / | | DATABASE_NAME | The database to connect to (**required**) | / | | DATABASE_HOST | Hostname of the database server (**required**) | / | +| DATABASE_PORT | Port of the database server | 5432 | | DATABASE_POOL_SIZE | Size of the database connection pool | 5 | | TESLA_USERNAME | Username / email of your Tesla account (**required**) | / | | TESLA_PASSWORD | Password of your Tesla account (**required**) | / | diff --git a/config/releases.exs b/config/releases.exs index 6afe5744..ea43a08c 100644 --- a/config/releases.exs +++ b/config/releases.exs @@ -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,