summaryrefslogtreecommitdiff
path: root/config/runtime.exs
diff options
context:
space:
mode:
authorLogan Hunt <logan.hunt@usu.edu>2023-02-01 10:25:20 -0700
committerLogan Hunt <logan.hunt@usu.edu>2023-02-01 10:25:20 -0700
commit9b5133dcbb39114a7f7ab84e0313d4f7035df123 (patch)
treea650bc9babf4654749b426b0e21474fdfc5b6b04 /config/runtime.exs
parent0ad97a374a52cd1c7b8323fa82b53742c935f891 (diff)
downloadchessh-9b5133dcbb39114a7f7ab84e0313d4f7035df123.tar.gz
chessh-9b5133dcbb39114a7f7ab84e0313d4f7035df123.zip
Fuck it. Environment variable hack.
Diffstat (limited to 'config/runtime.exs')
-rw-r--r--config/runtime.exs17
1 files changed, 17 insertions, 0 deletions
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")