|
|
|
@ -6,12 +6,10 @@ defmodule Dough do |
|
|
|
|
import Supervisor.Spec |
|
|
|
|
import Cachex.Spec |
|
|
|
|
|
|
|
|
|
import Logger |
|
|
|
|
|
|
|
|
|
def start(_type, _args) do |
|
|
|
|
# List all child processes to be supervised |
|
|
|
|
children = [ |
|
|
|
|
# Starts a worker by calling: Dough.Worker.start_link(arg) |
|
|
|
|
# {Dough.Worker, arg}, |
|
|
|
|
# Plug.Adapters.Cowboy.child_spec(:https, Dough.Router, [], port: 8331, keyfile: "priv/ssl/localhost.key", certfile: "priv/ssl/localhost.crt", otp_app: :dough) |
|
|
|
|
worker(Cachex, [ |
|
|
|
|
:dough, |
|
|
|
|
[ |
|
|
|
@ -34,8 +32,17 @@ defmodule Dough do |
|
|
|
|
]} |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
# See https://hexdocs.pm/elixir/Supervisor.html |
|
|
|
|
# for other strategies and supported options |
|
|
|
|
Logger.info(" |
|
|
|
|
██▄ ████▄ ▄ ▄▀ ▄ █ |
|
|
|
|
█ █ █ █ █ ▄▀ █ █ |
|
|
|
|
█ █ █ █ █ █ █ ▀▄ ██▀▀█ |
|
|
|
|
█ █ ▀████ █ █ █ █ █ █ |
|
|
|
|
███▀ █▄ ▄█ ███ █ |
|
|
|
|
▀▀▀ ▀ |
|
|
|
|
Starting Dough Server #{Application.get_env(:dough, :current_version)} ... |
|
|
|
|
DNS Proxying to #{Application.get_env(:dough, :dns_server)} |
|
|
|
|
") |
|
|
|
|
|
|
|
|
|
opts = [strategy: :one_for_one, name: Dough.Supervisor] |
|
|
|
|
Supervisor.start_link(children, opts) |
|
|
|
|
end |
|
|
|
|