Initial Commit

This commit is contained in:
bluepython508
2023-11-01 17:27:15 +00:00
commit 45e4e9f5da
929 changed files with 5425 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
defmodule SsoBsn.Application do
# See https://hexdocs.pm/elixir/Application.html
# for more information on OTP Applications
@moduledoc false
use Application
@impl true
def start(_type, _args) do
children = [
SsoBsnWeb.Telemetry,
SsoBsn.Repo,
{Ecto.Migrator,
repos: Application.fetch_env!(:sso_bsn, :ecto_repos),
skip: skip_migrations?()},
{DNSCluster, query: Application.get_env(:sso_bsn, :dns_cluster_query) || :ignore},
{Phoenix.PubSub, name: SsoBsn.PubSub},
# Start the Finch HTTP client for sending emails
{Finch, name: SsoBsn.Finch},
# Start a worker by calling: SsoBsn.Worker.start_link(arg)
# {SsoBsn.Worker, arg},
# Start to serve requests, typically the last entry
SsoBsnWeb.Endpoint
]
# See https://hexdocs.pm/elixir/Supervisor.html
# for other strategies and supported options
opts = [strategy: :one_for_one, name: SsoBsn.Supervisor]
Supervisor.start_link(children, opts)
end
# Tell Phoenix to update the endpoint configuration
# whenever the application is updated.
@impl true
def config_change(changed, _new, removed) do
SsoBsnWeb.Endpoint.config_change(changed, removed)
:ok
end
defp skip_migrations?() do
# By default, sqlite migrations are run when using a release
System.get_env("RELEASE_NAME") != nil
end
end

3
lib/sso_bsn/mailer.ex Normal file
View File

@@ -0,0 +1,3 @@
defmodule SsoBsn.Mailer do
use Swoosh.Mailer, otp_app: :sso_bsn
end

5
lib/sso_bsn/repo.ex Normal file
View File

@@ -0,0 +1,5 @@
defmodule SsoBsn.Repo do
use Ecto.Repo,
otp_app: :sso_bsn,
adapter: Ecto.Adapters.SQLite3
end