mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Allow port specification in instance.ex
This commit is contained in:
parent
e74f384b68
commit
4a895a46d1
2 changed files with 11 additions and 7 deletions
|
@ -58,12 +58,15 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
|||
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(
|
||||
|
@ -104,6 +107,7 @@ defmodule Mix.Tasks.Pleroma.Instance do
|
|||
EEx.eval_file(
|
||||
"sample_config.eex" |> Path.expand(__DIR__),
|
||||
domain: domain,
|
||||
port: port,
|
||||
email: email,
|
||||
name: name,
|
||||
dbhost: dbhost,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
use Mix.Config
|
||||
|
||||
config :pleroma, Pleroma.Web.Endpoint,
|
||||
url: [host: "<%= domain %>", scheme: "https", port: 443],
|
||||
url: [host: "<%= domain %>", scheme: "https", port: <%= port %>],
|
||||
secret_key_base: "<%= secret %>"
|
||||
|
||||
config :pleroma, :instance,
|
||||
|
|
Loading…
Reference in a new issue