Files
policy-service/lib/policy_service/repo.ex
Haim Kortovich a52f049a29 wip
2026-03-05 11:30:08 -05:00

14 lines
318 B
Elixir

defmodule PolicyService.Repo do
use Ecto.Repo,
otp_app: :policy_service,
adapter: Ecto.Adapters.Postgres
@doc """
Dynamically loads the repository url from the
DATABASE_URL environment variable.
"""
def init(_, opts) do
{:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
end
end