From 0ad97a374a52cd1c7b8323fa82b53742c935f891 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Wed, 1 Feb 2023 10:02:27 -0700 Subject: [PATCH] More config. This is getting tiresome --- config/config.exs | 8 -------- config/dev.exs | 8 ++++++++ config/prod.exs | 2 +- config/test.exs | 10 +++++++++- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/config/config.exs b/config/config.exs index a794bb7..c19937a 100644 --- a/config/config.exs +++ b/config/config.exs @@ -23,12 +23,4 @@ config :chessh, Web, config :joken, default_signer: "secret" -config :libcluster, - topologies: [ - erlang_hosts_example: [ - strategy: Elixir.Cluster.Strategy.ErlangHosts, - config: [timeout: 30_000] - ] - ] - import_config "#{config_env()}.exs" diff --git a/config/dev.exs b/config/dev.exs index f37da7b..0881420 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -12,3 +12,11 @@ config :hammer, {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]}, redis: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]} ] + +config :libcluster, + topologies: [ + chessh_dev: [ + strategy: Elixir.Cluster.Strategy.ErlangHosts, + config: [timeout: 30_000] + ] + ] diff --git a/config/prod.exs b/config/prod.exs index 5c199a0..838a637 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -20,7 +20,7 @@ config :libcluster, if_addr: "0.0.0.0", multicast_if: "192.168.1.1", multicast_addr: "233.252.255.255", - multicast_ttl: 1, + multicast_ttl: 1 ] ] ] diff --git a/config/test.exs b/config/test.exs index ae8c230..83ee6f1 100644 --- a/config/test.exs +++ b/config/test.exs @@ -18,6 +18,14 @@ config :hammer, redis: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]} ] +config :libcluster, + topologies: [ + chessh_test: [ + strategy: Elixir.Cluster.Strategy.Epmd + ] + ] + + config :chessh, - ssh_port: 34_355, + ssh_port: 42_069, key_dir: Path.join(Path.dirname(__DIR__), "priv/test_keys")