From f0349231260d81ff1ce4037ec2979f5b992bd12c Mon Sep 17 00:00:00 2001 From: Ingmar Stein Date: Wed, 18 Sep 2024 09:24:23 +0200 Subject: [PATCH] Add an example for unbound + redis --- examples/redis/custom.conf.d/cachedb.conf | 8 ++++++ examples/redis/docker-compose.yml | 31 +++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 examples/redis/custom.conf.d/cachedb.conf create mode 100644 examples/redis/docker-compose.yml diff --git a/examples/redis/custom.conf.d/cachedb.conf b/examples/redis/custom.conf.d/cachedb.conf new file mode 100644 index 0000000..c9e3baa --- /dev/null +++ b/examples/redis/custom.conf.d/cachedb.conf @@ -0,0 +1,8 @@ +server: + module-config: "validator cachedb iterator" + +cachedb: + backend: "redis" + redis-server-host: redis + redis-server-port: 6379 + redis-expire-records: yes diff --git a/examples/redis/docker-compose.yml b/examples/redis/docker-compose.yml new file mode 100644 index 0000000..fdaf3ec --- /dev/null +++ b/examples/redis/docker-compose.yml @@ -0,0 +1,31 @@ +volumes: + redis: + +services: + redis: + image: redis:latest + container_name: redis + hostname: redis + restart: unless-stopped + volumes: + - redis:/data + healthcheck: + test: "[ $$(redis-cli ping) = 'PONG' ]" + interval: 30s + timeout: 3s + retries: 3 + start_period: 30s + + unbound: + image: klutchell/unbound + healthcheck: + test: ["CMD", "drill", "@127.0.0.1", "dnssec.works"] + interval: 30s + timeout: 30s + retries: 3 + start_period: 30s + volumes: + - ./custom.conf.d:/etc/unbound/custom.conf.d:ro + restart: unless-stopped + depends_on: + - redis