defmodule Nugitea.Application do@moduledoc falseuse Application@impl truedef start(_type, _args) dorole = Application.fetch_env!(:nugitea, :role)if storage = Application.fetch_env!(:nugitea, :storage_node) doNode.connect(storage) || raise "can't reach storage node #{storage}"endchildren =if role in [:all, :app] and Application.fetch_env!(:nugitea, :serve) do[{Bandit, plug: Nugitea.Router, port: Application.fetch_env!(:nugitea, :http_port)},Nugitea.SSH,Nugitea.Mirror.Scheduler]else[]endSupervisor.start_link(children, strategy: :one_for_one, name: Nugitea.Supervisor)endend