1
0
mirror of https://github.com/algora-io/tv.git synced 2025-03-17 20:17:45 +02:00
algora-tv/lib/algora/repo.ex

21 lines
446 B
Elixir

defmodule Algora.Repo.Local do
use Ecto.Repo,
otp_app: :algora,
adapter: Ecto.Adapters.Postgres
@env Mix.env()
# Dynamically configure the database url based on runtime and build
# environments.
def init(_type, config) do
# url = Fly.Postgres.rewrite_database_url!(config)
# dbg(url)
Fly.Postgres.config_repo_url(config, @env)
end
end
defmodule Algora.Repo do
use Fly.Repo, local_repo: Algora.Repo.Local
end