diff --git a/docker-compose.yaml b/docker-compose.yaml index d329c780..ed72c820 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -27,6 +27,26 @@ services: timeout: 2s retries: 10 + # Redis - caching + rate limiting on BE + redis: + image: redis + restart: always + ports: + - 6379:6379 + healthcheck: + test: ["CMD-SHELL", "redis-cli ping | grep PONG"] + interval: 2s + timeout: 2s + retries: 10 + command: redis-server /usr/local/etc/redis/redis.conf + volumes: + - ./redis.conf:/usr/local/etc/redis/redis.conf + # insights host - redis:6379 + redis-insights: + image: redislabs/redisinsight:latest + ports: + - 8001:8001 + # This DB is for Web Authentication and data caching. webdb: image: postgres diff --git a/redis.conf b/redis.conf new file mode 100644 index 00000000..58da1e05 --- /dev/null +++ b/redis.conf @@ -0,0 +1,2 @@ +maxmemory 100mb +maxmemory-policy allkeys-lru