From e58d6e23edd2cfc1da7feab3cfc2b09326b73bff Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 31 Oct 2022 16:45:31 -0600 Subject: Remove Redis dep, replace w/ native Elixir lib This removes the dependency on Redis for core app functionality. Rather than using the key/value store provided by Redis, Farside now uses a key/val store provided by [cubdb](https://github.com/lucaong/cubdb) for identical functionality but without reliance on a non-Elixir service. This solution was chosen instead of ets, because storing instance data in memory leads to a period of broken functionality whenever the app restarts and hasn't re-populated instance data yet. It was also chosen instead of dets, because the documentation for dets was pretty hard to understand at first glance. Tests and the CI build were updated to reflect the removed dependency on Redis. New environment variable `FARSIDE_DATA_DIR` can be used to point to a directory where the instance data can be stored by cubdb. Co-authored-by: Jason Clark --- config/runtime.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/runtime.exs') diff --git a/config/runtime.exs b/config/runtime.exs index e4491ff..e00feb8 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -2,5 +2,5 @@ import Config config :farside, port: System.get_env("FARSIDE_PORT", "4001"), - redis_conn: "redis://localhost:#{System.get_env("FARSIDE_REDIS_PORT", "6379")}", - services_json: System.get_env("FARSIDE_SERVICES_JSON", "services.json") + services_json: System.get_env("FARSIDE_SERVICES_JSON", "services.json"), + data_dir: System.get_env("FARSIDE_DATA_DIR", File.cwd!) -- cgit v1.2.3