diff --git a/config/runtime.exs b/config/runtime.exs index 2cdfa3c..241a7df 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -71,6 +71,23 @@ if config_env() == :prod do aprs_is_login_id: System.get_env("APRS_CALLSIGN"), aprs_is_password: System.get_env("APRS_PASSCODE") + app_name = + System.get_env("FLY_APP_NAME") || + raise "FLY_APP_NAME not available" + + config :libcluster, + debug: true, + topologies: [ + fly6pn: [ + strategy: Cluster.Strategy.DNSPoll, + config: [ + polling_interval: 5_000, + query: "#{app_name}.internal", + node_basename: app_name + ] + ] + ] + # ## SSL Support # # To get SSL working, you will need to add the `https` key