2018-12-23 13:04:54 -07:00
|
|
|
# Pleroma: A lightweight social networking server
|
2018-12-31 08:41:47 -07:00
|
|
|
# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
|
2018-12-23 13:04:54 -07:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2017-03-17 10:09:58 -06:00
|
|
|
defmodule Pleroma.Repo do
|
|
|
|
use Ecto.Repo, otp_app: :pleroma
|
|
|
|
|
|
|
|
@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
|