Change configuration and docker compose

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-01-03 11:33:52 +01:00
parent 3c1b0448a8
commit 6885c73aa8
9 changed files with 60 additions and 28 deletions

View File

@@ -66,7 +66,10 @@ defmodule MobilizonWeb.Endpoint do
"""
def init(_key, config) do
if config[:load_from_system_env] do
port = System.get_env("PORT") || raise "expected the PORT environment variable to be set"
port =
System.get_env("MOBILIZON_INSTANCE_PORT") ||
raise "expected the MOBILIZON_INSTANCE_PORT environment variable to be set"
{:ok, Keyword.put(config, :http, [:inet6, port: port])}
else
{:ok, config}