diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/config.exs | 13 | ||||
-rw-r--r-- | config/test.exs | 6 |
2 files changed, 16 insertions, 3 deletions
diff --git a/config/config.exs b/config/config.exs index daffcad..42339fd 100644 --- a/config/config.exs +++ b/config/config.exs @@ -2,8 +2,17 @@ import Config config :chessh, ecto_repos: [Chessh.Repo], - priv_dir: Path.join(Path.dirname(__DIR__), "priv/keys"), - port: 42069, + key_dir: Path.join(Path.dirname(__DIR__), "priv/keys"), + port: 42_069, max_sessions: 255 +config :chessh, RateLimits, + jail_timeout_ms: 5 * 60 * 1000, + jail_attempt_threshold: 15, + max_concurrent_user_sessions: 5 + +# 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]} + import_config "#{config_env()}.exs" diff --git a/config/test.exs b/config/test.exs index c1d70dd..002b49f 100644 --- a/config/test.exs +++ b/config/test.exs @@ -1,5 +1,9 @@ import Config +config :chessh, RateLimits, + jail_timeout_ms: 5000, + jail_attempt_threshold: 3 + config :chessh, Chessh.Repo, database: "chessh-test", username: "postgres", @@ -8,4 +12,4 @@ config :chessh, Chessh.Repo, pool: Ecto.Adapters.SQL.Sandbox config :chessh, - priv_dir: Path.join(Path.dirname(__DIR__), "priv/keys") + key_dir: Path.join(Path.dirname(__DIR__), "priv/test_keys") |