wip
This commit is contained in:
13
lib/policy_service/repo.ex
Normal file
13
lib/policy_service/repo.ex
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
Reference in New Issue
Block a user