From 9b5133dcbb39114a7f7ab84e0313d4f7035df123 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Wed, 1 Feb 2023 10:25:20 -0700 Subject: Fuck it. Environment variable hack. --- config/runtime.exs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'config/runtime.exs') diff --git a/config/runtime.exs b/config/runtime.exs index ebdb2cc..19078c5 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -13,6 +13,23 @@ config :chessh, Web, System.get_env("SERVER_REDIRECT_URI", "http://127.0.0.1:3000/api/oauth/redirect"), port: String.to_integer(System.get_env("WEB_PORT", "8080")) +config :libcluster, + topologies: [ + chessh: [ + strategy: Cluster.Strategy.Epmd, + config: [ + hosts: + String.split(System.get_env("CLUSTER_NODES", ""), ",") + |> Enum.filter(fn x -> String.length(x) > 0 end) + |> Enum.map(&String.to_atom/1) + ], + connect: {:net_kernel, :connect, []}, + disconnect: {:net_kernel, :disconnect, []}, + list_nodes: {:erlang, :nodes, [:connected]}, + child_spec: [restart: :transient] + ] + ] + config :joken, default_signer: System.get_env("JWT_SECRET") -- cgit v1.2.3-70-g09d2