Commit 8a1227162d9269254714b985b4a66e31d8ddbf90

Thomas de Grivel 2021-11-29T10:21:28

config prod

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/config/prod.exs b/config/prod.exs
index e98c500..b15c36d 100644
--- a/config/prod.exs
+++ b/config/prod.exs
@@ -10,9 +10,13 @@ import Config
 # which you should run after static files are built and
 # before starting your production server.
 config :kmxgit, KmxgitWeb.Endpoint,
-  http: [net: :inet, ip: {127, 0, 0, 1}, port: 15008],
   url: [scheme: "https", host: "git.kmx.io", port: 443],
-  cache_static_manifest: "priv/static/cache_manifest.json"
+  cache_static_manifest: "priv/static/cache_manifest.json",
+  http: [
+    net: :inet,
+    ip: {127, 0, 0, 1},
+    port: String.to_integer(System.get_env("PORT") || "4000"),
+  ]
 
 # Do not print debug messages in production
 config :logger, level: :info