whoops

1e0f31b · gmorell · 2022-08-05 22:45

2 files +44 -21

Files changed

modified config/runtime.exs
+44 −21
@@ -72,14 +72,16 @@ if config_env() == :prod do
72 72
73 73 maybe_ipv6 = if System.get_env("ECTO_IPV6"), do: [:inet6], else: []
74 74
75 − config :room_sanctum, RoomSanctum.Repo,
76 − # ssl: true,
77 − url: database_url,
78 − pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
79 − socket_options: maybe_ipv6,
80 − types: RoomSanctum.PostgresTypes
81 −
82 − config :room_hermes, RoomHermes.Repo,
75 + config :room_sanctum,
76 + RoomSanctum.Repo,
77 + # ssl: true,
78 + url: database_url,
79 + pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
80 + socket_options: maybe_ipv6,
81 + types: RoomSanctum.PostgresTypes
82 +
83 + config :room_hermes,
84 + RoomHermes.Repo,
83 85 # ssl: true,
84 86 url: database_url,
85 87 pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
@@ -98,19 +100,40 @@ if config_env() == :prod do
98 100 """
99 101
100 102 host = System.get_env("PHX_HOST") || "example.com"
101 − port = String.to_integer(System.get_env("SPORT") || "4001")
102 −
103 − config :room_sanctum, RoomSanctumWeb.Endpoint,
104 − url: [host: host, port: 443],
105 − http: [
106 − # Enable IPv6 and bind on all interfaces.
107 − # Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access.
108 − # See the documentation on https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html
109 − # for details about using IPv6 vs IPv4 and loopback vs public addresses.
110 − ip: {0, 0, 0, 0, 0, 0, 0, 0},
111 − port: port
112 − ],
113 − secret_key_base: secret_key_base
103 + sport = String.to_integer(System.get_env("SPORT") || "4000")
104 + hport = String.to_integer(System.get_env("HPORT") || "4000")
105 +
106 + config :room_sanctum,
107 + RoomSanctumWeb.Endpoint,
108 + url: [
109 + host: host,
110 + port: 443
111 + ],
112 + http: [
113 + # Enable IPv6 and bind on all interfaces.
114 + # Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access.
115 + # See the documentation on https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html
116 + # for details about using IPv6 vs IPv4 and loopback vs public addresses.
117 + ip: {0, 0, 0, 0, 0, 0, 0, 0},
118 + port: sport
119 + ],
120 + secret_key_base: secret_key_base
121 +
122 + config :room_hermes,
123 + RoomHermesWeb.Endpoint,
124 + url: [
125 + host: host,
126 + port: 443
127 + ],
128 + http: [
129 + # Enable IPv6 and bind on all interfaces.
130 + # Set it to {0, 0, 0, 0, 0, 0, 0, 1} for local network only access.
131 + # See the documentation on https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html
132 + # for details about using IPv6 vs IPv4 and loopback vs public addresses.
133 + ip: {0, 0, 0, 0, 0, 0, 0, 0},
134 + port: hport
135 + ],
136 + secret_key_base: secret_key_base
114 137
115 138 # ## Using releases
116 139 #

Parents: 80767bf