diff --git a/.env.example b/.env.example index d38a768..6be63ba 100644 --- a/.env.example +++ b/.env.example @@ -5,6 +5,8 @@ GUARD_URI="http://localhost:3001" GUARD_DB_URL="postgres://:@:/?sslmode=disable" +GUARD_REDIS_URL="redis://guard:guard@localhost:6379/0" + GUARD_ADMIN_NAME="admin" GUARD_ADMIN_EMAIL="admin@test.net" GUARD_ADMIN_PASSWORD="secret" diff --git a/docker-compose.yml b/docker-compose.yml index 517fccf..0e15e8c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,3 +8,18 @@ services: POSTGRES_PASSWORD: guard ports: - "5432:5432" + + cache: + image: redis:7.2 # or newer + container_name: guard-redis + ports: + - "6379:6379" + volumes: + - redis-data:/data + - ./redis.conf:/usr/local/etc/redis/redis.conf + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + restart: unless-stopped + +volumes: + redis-data: + driver: local diff --git a/redis.conf b/redis.conf new file mode 100644 index 0000000..7b17b3f --- /dev/null +++ b/redis.conf @@ -0,0 +1,4 @@ + +# Enable ACL +user default off +user guard on >guard allcommands allkeys