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( Common.get_option(
options, options,
:domain, :domain,
"What domain will your instance use? (e.g framameet.org)" "What domain will your instance use? (e.g mobilizon.org)"
), ),
":" ":"
) ++ [443] ) ++ [443]
@ -80,10 +80,16 @@ defmodule Mix.Tasks.Mobilizon.Instance do
Common.get_option( Common.get_option(
options, options,
:name, :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 = dbhost =
Common.get_option(options, :dbhost, "What is the hostname of your database?", "localhost") Common.get_option(options, :dbhost, "What is the hostname of your database?", "localhost")
@ -121,14 +127,6 @@ defmodule Mix.Tasks.Mobilizon.Instance do
4000 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) 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) 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), version: Mobilizon.Mixfile.project() |> Keyword.get(:version),
instance_secret: instance_secret, instance_secret: instance_secret,
auth_secret: auth_secret, auth_secret: auth_secret,
listen_ip: listen_ip,
listen_port: listen_port listen_port: listen_port
) )

View file

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