From 67c2a16b05076653b9785e1294aa3da7d603140e Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Tue, 23 Mar 2021 11:05:02 +0000 Subject: [PATCH] adding redis stack to dev --- hosting/docker-compose.yaml | 10 ++++++++++ hosting/envoy.yaml | 20 ++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/hosting/docker-compose.yaml b/hosting/docker-compose.yaml index e8408d9a7d..78408c85e6 100644 --- a/hosting/docker-compose.yaml +++ b/hosting/docker-compose.yaml @@ -93,9 +93,19 @@ services: depends_on: - couchdb-service command: ["sh","-c","sleep 10 && $${PUT_CALL}/_users && $${PUT_CALL}/_replicator; fg;"] + + redis-service: + restart: always + image: redis + ports: + - "${REDIS_PORT}:6379" + volumes: + - redis_data:/data volumes: couchdb_data: driver: local minio_data: driver: local + redis_data: + driver: local diff --git a/hosting/envoy.yaml b/hosting/envoy.yaml index 11f5c81b99..8c6081d1a7 100644 --- a/hosting/envoy.yaml +++ b/hosting/envoy.yaml @@ -36,6 +36,11 @@ static_resources: cluster: worker-service prefix_rewrite: "/" + - match: { prefix: "/cache/" } + route: + cluster: redis-service + prefix_rewrite: "/" + - match: { prefix: "/db/" } route: cluster: couchdb-service @@ -107,3 +112,18 @@ static_resources: address: couchdb-service port_value: 5984 + - name: redis-service + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + load_assignment: + cluster_name: redis-service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: redis-service + port_value: 6379 + +