|
|
@ -6,12 +6,10 @@ defmodule Dough do |
|
|
|
import Supervisor.Spec |
|
|
|
import Supervisor.Spec |
|
|
|
import Cachex.Spec |
|
|
|
import Cachex.Spec |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import Logger |
|
|
|
|
|
|
|
|
|
|
|
def start(_type, _args) do |
|
|
|
def start(_type, _args) do |
|
|
|
# List all child processes to be supervised |
|
|
|
|
|
|
|
children = [ |
|
|
|
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, [ |
|
|
|
worker(Cachex, [ |
|
|
|
:dough, |
|
|
|
:dough, |
|
|
|
[ |
|
|
|
[ |
|
|
@ -34,8 +32,17 @@ defmodule Dough do |
|
|
|
]} |
|
|
|
]} |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
# See https://hexdocs.pm/elixir/Supervisor.html |
|
|
|
Logger.info(" |
|
|
|
# for other strategies and supported options |
|
|
|
██▄ ████▄ ▄ ▄▀ ▄ █ |
|
|
|
|
|
|
|
█ █ █ █ █ ▄▀ █ █ |
|
|
|
|
|
|
|
█ █ █ █ █ █ █ ▀▄ ██▀▀█ |
|
|
|
|
|
|
|
█ █ ▀████ █ █ █ █ █ █ |
|
|
|
|
|
|
|
███▀ █▄ ▄█ ███ █ |
|
|
|
|
|
|
|
▀▀▀ ▀ |
|
|
|
|
|
|
|
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] |
|
|
|
opts = [strategy: :one_for_one, name: Dough.Supervisor] |
|
|
|
Supervisor.start_link(children, opts) |
|
|
|
Supervisor.start_link(children, opts) |
|
|
|
end |
|
|
|
end |
|
|
|