Skip to content

Commit

Permalink
Configure Phoenix to bind to both inet & inet6
Browse files Browse the repository at this point in the history
So that we can connect to the app directly via the private network -
same as we do to our pghero instance.

Signed-off-by: Gerhard Lazu <[email protected]>
  • Loading branch information
gerhard committed Jun 11, 2024
1 parent 5e7316a commit b6dfe73
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Config

port = 4000
config :changelog, ChangelogWeb.Endpoint,
http: [port: port],
http: [port: port, ip: {0, 0, 0, 0, 0, 0, 0, 0}],
url: [host: System.get_env("HOST", "localhost")],
check_origin: false,
static_url: [path: "/static"],
Expand Down
2 changes: 1 addition & 1 deletion config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Config
static_url_host = System.get_env("STATIC_URL_HOST", "cdn.changelog.com")

config :changelog, ChangelogWeb.Endpoint,
http: [port: System.get_env("HTTP_PORT", "4000")],
http: [port: System.get_env("HTTP_PORT", "4000"), ip: {0, 0, 0, 0, 0, 0, 0, 0}],
url: [
scheme: System.get_env("URL_SCHEME", "https"),
host: System.get_env("URL_HOST", "changelog.com"),
Expand Down
2 changes: 1 addition & 1 deletion config/test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Config
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :changelog, ChangelogWeb.Endpoint,
http: [port: 4001],
http: [port: 4001, ip: {0, 0, 0, 0, 0, 0, 0, 0}],
server: false

# Print only warnings and errors during test
Expand Down

0 comments on commit b6dfe73

Please sign in to comment.