Skip to content

Instantly share code, notes, and snippets.

@asta-kun
Created June 11, 2021 15:09
Show Gist options
  • Select an option

  • Save asta-kun/476a8e492605764bf9bde56b30974143 to your computer and use it in GitHub Desktop.

Select an option

Save asta-kun/476a8e492605764bf9bde56b30974143 to your computer and use it in GitHub Desktop.
version: "3"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
depends_on:
- cloudflared
ports:
- "127.0.0.1:53:53/tcp"
- "127.0.0.1:53:53/udp"
- "127.0.0.1:80:80/tcp"
- "127.0.0.1:443:443/tcp"
expose:
- "53/tcp"
- "53/udp"
networks:
default:
cloudflared_net:
ipv4_address: 10.0.0.3
environment:
TZ: 'America/Chicago'
DNS1: '10.0.0.2#5054'
DNS2: '10.0.0.2#5054'
volumes:
- './etc-pihole/:/etc/pihole/'
- './etc-dnsmasq.d/:/etc/dnsmasq.d/'
dns:
- 127.0.0.1
- 1.1.1.1
cap_add:
- NET_ADMIN
restart: unless-stopped
cloudflared:
image: visibilityspots/cloudflared
container_name: cloudflared
expose:
- "5054/tcp"
- "5054/udp"
environment:
PORT: 5054
ADDRESS: 0.0.0.0
restart: always
environment:
TZ: 'America/Chicago'
restart: unless-stopped
networks:
cloudflared_net:
ipv4_address: 10.0.0.2
networks:
cloudflared_net:
driver: bridge
ipam:
config:
- subnet: 10.0.0.0/29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment