From ce06ddd669363651d335f5a4c05e1a347020a3c1 Mon Sep 17 00:00:00 2001 From: Logan Hunt Date: Tue, 24 Jan 2023 12:12:58 -0700 Subject: Redis time --- config/runtime.exs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'config/runtime.exs') 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")) -- cgit v1.2.3-70-g09d2