Install fixes

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2020-06-10 09:38:06 +02:00
parent 503616fa60
commit da3673386c
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
2 changed files with 13 additions and 16 deletions

View File

@ -71,7 +71,7 @@ defmodule Mix.Tasks.Mobilizon.Instance do
Common.get_option(
options,
:domain,
"What domain will your instance use? (e.g framameet.org)"
"What domain will your instance use? (e.g mobilizon.org)"
),
":"
) ++ [443]
@ -80,10 +80,16 @@ defmodule Mix.Tasks.Mobilizon.Instance do
Common.get_option(
options,
:name,
"What is the name of your instance? (e.g. Framameet)"
"What is the name of your instance? (e.g. Mobilizon)"
)
email = Common.get_option(options, :admin_email, "What is your admin email address?")
email =
Common.get_option(
options,
:admin_email,
"What's the address email will be send with?",
"noreply@#{domain}"
)
dbhost =
Common.get_option(options, :dbhost, "What is the hostname of your database?", "localhost")
@ -121,14 +127,6 @@ defmodule Mix.Tasks.Mobilizon.Instance do
4000
)
listen_ip =
Common.get_option(
options,
:listen_ip,
"What ip will the app listen to (leave it if you are using the default setup with nginx)?",
"127.0.0.1"
)
instance_secret = :crypto.strong_rand_bytes(64) |> Base.encode64() |> binary_part(0, 64)
auth_secret = :crypto.strong_rand_bytes(64) |> Base.encode64() |> binary_part(0, 64)
@ -149,7 +147,6 @@ defmodule Mix.Tasks.Mobilizon.Instance do
version: Mobilizon.Mixfile.project() |> Keyword.get(:version),
instance_secret: instance_secret,
auth_secret: auth_secret,
listen_ip: listen_ip,
listen_port: listen_port
)

View File

@ -3,8 +3,8 @@
import Config
config :mobilizon, Mobilizon.Web.Endpoint,
url: [host: "<%= instance_domain %>", scheme: "https", port: <%= instance_port %>],
http: [ip: {<%= String.replace(listen_ip, ".", ", ") %>}, port: <%= listen_port %>],
url: [host: "<%= instance_domain %>"],
http: [port: <%= listen_port %>],
secret_key_base: "<%= instance_secret %>"
config :mobilizon, Mobilizon.Web.Auth.Guardian,
@ -18,8 +18,8 @@ config :mobilizon, :instance,
demo: false,
allow_relay: true,
federating: true,
email_from: "tcit@tcit.fr",
email_reply_to: "tcit@tcit.fr"
email_from: "<%= instance_email %>",
email_reply_to: "<%= instance_email %>"
config :mobilizon, Mobilizon.Storage.Repo,
adapter: Ecto.Adapters.Postgres,