add license boilerplate to pleroma core
[akkoma] / lib / pleroma / repo.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Repo do
6 use Ecto.Repo, otp_app: :pleroma
7
8 @doc """
9 Dynamically loads the repository url from the
10 DATABASE_URL environment variable.
11 """
12 def init(_, opts) do
13 {:ok, Keyword.put(opts, :url, System.get_env("DATABASE_URL"))}
14 end
15 end