Skip to content

Commit

Permalink
Merge pull request #499 from IngmarStein/example-redis
Browse files Browse the repository at this point in the history
Add an example for unbound + redis
  • Loading branch information
klutchell authored Sep 18, 2024
2 parents 146491b + f034923 commit b6b85cb
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
8 changes: 8 additions & 0 deletions examples/redis/custom.conf.d/cachedb.conf
Original file line number Diff line number Diff line change
@@ -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
31 changes: 31 additions & 0 deletions examples/redis/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b6b85cb

Please sign in to comment.