mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-21 23:44:30 +00:00
Allow specifying the listen_ip on Docker
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
b1e6fcd73b
commit
b645c7dade
1 changed files with 12 additions and 1 deletions
|
@ -2,10 +2,21 @@
|
|||
|
||||
import Config
|
||||
|
||||
listen_ip = System.get_env("MOBILIZON_INSTANCE_LISTEN_IP", "::")
|
||||
|
||||
listen_ip =
|
||||
case :inet.parse_address(listen_ip) do
|
||||
{:ok, listen_ip} -> listen_ip
|
||||
_ -> raise "MOBILIZON_INSTANCE_LISTEN_IP does not match the expected IP format."
|
||||
end
|
||||
|
||||
config :mobilizon, Mobilizon.Web.Endpoint,
|
||||
server: true,
|
||||
url: [host: System.get_env("MOBILIZON_INSTANCE_HOST", "mobilizon.lan")],
|
||||
http: [port: System.get_env("MOBILIZON_INSTANCE_PORT", "4000")],
|
||||
http: [
|
||||
port: System.get_env("MOBILIZON_INSTANCE_PORT", "4000"),
|
||||
ip: listen_ip
|
||||
],
|
||||
secret_key_base: System.get_env("MOBILIZON_INSTANCE_SECRET_KEY_BASE", "changethis")
|
||||
|
||||
config :mobilizon, Mobilizon.Web.Auth.Guardian,
|
||||
|
|
Loading…
Reference in a new issue