From 349acb1fcb5a3d024fe090b22a38c9242cb1ddff Mon Sep 17 00:00:00 2001 From: Sahil Silare Date: Sat, 19 Oct 2024 17:39:48 +0530 Subject: [PATCH] fix: fixed redis configuration to use shared cache --- docker-compose.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 3a24562960..866424a670 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,10 @@ services: tty: true volumes: - ./.env:/home/node/app/.env + environment: + - REDIS_ENABLED=true + - REDIS_URL=redis://redis:6379 + relay-ws: container_name: hedera-json-rpc-relay-ws image: "ghcr.io/hashgraph/hedera-json-rpc-relay:main" @@ -17,6 +21,8 @@ services: environment: HEALTHCHECK_PORT: 8547 SUBSCRIPTIONS_ENABLED: true + REDIS_ENABLED: true + REDIS_URL: redis://redis:6379 restart: "unless-stopped" ports: - 8546:8546 @@ -25,3 +31,15 @@ services: tty: true volumes: - ./.env:/home/node/app/.env + + redis: + image: redis:latest + container_name: redis_cache + ports: + - '6379:6379' + volumes: + - redis-data:/data + restart: always + +volumes: + redis-data: \ No newline at end of file