-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
90 lines (75 loc) · 2.7 KB
/
Copy pathdocker-compose.yml
File metadata and controls
90 lines (75 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: '3.8'
services:
cdnsbl:
build:
context: .
dockerfile: Dockerfile
container_name: cdnsbl
restart: unless-stopped
# Port mappings
ports:
- "5353:5353/udp"
# Uncomment for production on port 53 (requires privileged or NET_BIND_SERVICE capability)
# - "53:53/udp"
# Environment variables (can also use env_file)
environment:
# Logging configuration
- LOGLEVEL=info
# Options: debug, info, warn, error
# Backend selection (default: dbip)
- BACKEND=dbip
# Options:
# dbip - DB-IP Lite (no registration, updates monthly) [DEFAULT]
# geoip - MaxMind GeoLite2 (requires license key, updates weekly)
# ipapi - IP-API.com (no registration, real-time API, 45 req/min limit)
# ipinfo - IPInfo.io (requires token, MMDB or API mode, 50k req/month)
# ip2location - IP2Location LITE (requires registration, updates monthly)
# Data directory for databases
- DATA_DIR=/data
# DNS server configuration
- DNS_LISTEN_ADDR=:5353
# For production on port 53: DNS_LISTEN_ADDR=:53 (requires CAP_NET_BIND_SERVICE)
- DNS_ZONE=cbl.home.lan
# MaxMind GeoIP configuration (if using BACKEND=geoip)
# Sign up at: https://www.maxmind.com/en/geolite2/signup
# - GEOIP_LICENSE_KEY=your_license_key_here
# - GEOIP_ACCOUNT_ID=your_account_id_here
# IPInfo.io configuration (if using BACKEND=ipinfo)
# Sign up at: https://ipinfo.io/signup
# - IPINFO_TOKEN=your_token_here
# - IPINFO_USE_API=false
# Uncomment IPINFO_USE_API=true to force API mode instead of MMDB database
# IP2Location configuration (if using BACKEND=ip2location)
# Sign up at: https://lite.ip2location.com/sign-up
# - IP2LOCATION_TOKEN=your_token_here
# Token is optional, for automatic monthly database updates
# Alternative: use env file
# env_file:
# - .env
# Volume for persistent database storage
volumes:
- cdnsbl-data:/data
# Uncomment to use custom .env file
# - ./.env:/app/.env:ro
# Healthcheck
healthcheck:
test: ["CMD-SHELL", "timeout 2 sh -c 'echo > /dev/udp/127.0.0.1/5353' || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
# Resource limits (optional)
deploy:
resources:
limits:
cpus: '0.5'
memory: 256M
reservations:
cpus: '0.1'
memory: 64M
# Uncomment for production on port 53
# cap_add:
# - NET_BIND_SERVICE
# Named volume for database persistence
volumes:
cdnsbl-data: