From 9a6f649157f30e99d60dc14a4383013b44cd9eac Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Mon, 7 Jul 2025 16:41:14 -0500 Subject: [PATCH] add clustering --- config/runtime.exs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/config/runtime.exs b/config/runtime.exs index 53d9c3d..4cd39a3 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -82,6 +82,19 @@ if config_env() == :prod do aprs_is_password: System.get_env("APRS_PASSCODE"), env: :prod + # Configure libcluster for Dokku clustering + config :libcluster, + topologies: [ + dokku: [ + strategy: Cluster.Strategy.DNSPoll, + config: [ + polling_interval: 5_000, + query: System.get_env("DOKKU_DNS_CLUSTER_QUERY", "tasks.#{System.get_env("DOKKU_APP_NAME", "aprsme")}"), + node_basename: System.get_env("DOKKU_APP_NAME", "aprsme") + ] + ] + ] + # ## Configuring the mailer # # In production you need to configure the mailer to use a different adapter.