-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose-template.yml
49 lines (47 loc) · 1.33 KB
/
docker-compose-template.yml
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
version: "2"
networks:
macvlan:
name: synology-pihole_macvlan
driver: macvlan
driver_opts:
parent: ${INTERFACE}
ipam:
config:
- subnet: ${SUBNET}
gateway: ${GATEWAY}
ip_range: ${IP_RANGE}
services:
pihole:
container_name: ${PIHOLE_HOSTNAME}
image: pihole/pihole:latest
ports:
- 53:53/tcp
- 53:53/udp
- 67:67/udp
- 80:80/tcp
- 443:443/tcp
environment:
DNSMASQ_LISTENING: all
DNSMASQ_USER: root
TZ: ${TIMEZONE}
WEBPASSWORD: ${WEBPASSWORD}
VIRTUAL_HOST: ${DOMAIN_NAME}
DNS1: ${DNS1}
DNS2: ${DNS2}
ServerIP: ${PIHOLE_IP}
volumes:
# Keep data between container upgrades
- ${DATA_PATH}/pihole/:/etc/pihole/
- ${DATA_PATH}/dnsmasq.d/:/etc/dnsmasq.d/
# Synchronize with host clock
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
networks:
macvlan:
ipv4_address: ${PIHOLE_IP}
mac_address: ${MAC_ADDRESS}
hostname: ${PIHOLE_HOSTNAME}
domainname: ${DOMAIN_NAME}
dns:
- 127.0.0.1
- ${DNS1}