+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2018 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
+
defmodule Mix.Tasks.Pleroma.Instance do
use Mix.Task
alias Mix.Tasks.Pleroma.Common
proceed? = Enum.empty?(will_overwrite) or Keyword.get(options, :force, false)
unless not proceed? do
- domain =
- Common.get_option(
- options,
- :domain,
- "What domain will your instance use? (e.g pleroma.soykaf.com)"
- )
+ [domain, port | _] =
+ String.split(
+ Common.get_option(
+ options,
+ :domain,
+ "What domain will your instance use? (e.g pleroma.soykaf.com)"
+ ),
+ ":"
+ ) ++ [443]
name =
Common.get_option(
options,
- :name,
+ :instance_name,
"What is the name of your instance? (e.g. Pleroma/Soykaf)"
)
EEx.eval_file(
"sample_config.eex" |> Path.expand(__DIR__),
domain: domain,
+ port: port,
email: email,
name: name,
dbhost: dbhost,