diff options
author | Logan Hunt <logan.hunt@usu.edu> | 2023-01-24 12:12:58 -0700 |
---|---|---|
committer | Logan Hunt <logan.hunt@usu.edu> | 2023-01-24 12:14:07 -0700 |
commit | ce06ddd669363651d335f5a4c05e1a347020a3c1 (patch) | |
tree | 74e60d55d9c7eaa42b269a6d59de43c86fdb9b77 /config | |
parent | a634901317de06ca09f3d78b3d0205c4d19df0cf (diff) | |
download | chessh-ce06ddd669363651d335f5a4c05e1a347020a3c1.tar.gz chessh-ce06ddd669363651d335f5a4c05e1a347020a3c1.zip |
Redis time
Diffstat (limited to 'config')
-rw-r--r-- | config/config.exs | 4 | ||||
-rw-r--r-- | config/runtime.exs | 15 |
2 files changed, 15 insertions, 4 deletions
diff --git a/config/config.exs b/config/config.exs index ef3c828..15cde18 100644 --- a/config/config.exs +++ b/config/config.exs @@ -1,9 +1,5 @@ import Config -# This will be redis when scaled across multiple nodes -config :hammer, - backend: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]} - config :chessh, ecto_repos: [Chessh.Repo], key_dir: Path.join(Path.dirname(__DIR__), "priv/keys"), diff --git a/config/runtime.exs b/config/runtime.exs index 5c741ff..f3cc03c 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -1,5 +1,20 @@ import Config +config :hammer, + backend: [ + in_memory: + {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]}, + redis: + {Hammer.Backend.Redis, + [ + expiry_ms: 60_000 * 60 * 2, + redix_config: [ + host: System.get_env("REDIS_HOST", "localhost"), + port: String.to_integer(System.get_env("REDIS_PORT", "6379")) + ] + ]} + ] + config :chessh, port: String.to_integer(System.get_env("SSH_PORT", "42069")) |