Skip to content

Instantly share code, notes, and snippets.

@mabitt
Created July 26, 2019 18:03
Show Gist options
  • Save mabitt/b8bfff9b19b762cc39e831407486f834 to your computer and use it in GitHub Desktop.
Save mabitt/b8bfff9b19b762cc39e831407486f834 to your computer and use it in GitHub Desktop.
docker-compose for OpenVPN-AS with PiHole and cloudflared proxy-dns (DNS over HTTPS)
version: "3.5"
services:
cloudflared:
container_name: cloudflared
image: visibilityspots/cloudflared:amd64
restart: unless-stopped
networks:
openvpn_net:
ipv4_address: 10.0.0.2
pi-hole:
container_name: pi-hole
image: pihole/pihole:4.3.1-4_amd64
restart: unless-stopped
environment:
- ServerIP=10.0.0.3
- DNS1='10.0.0.2#5054'
- DNS2=''
- IPv6=false
- TZ=UTC
- DNSMASQ_LISTENING=all
- WEBPASSWORD=pihole_admin_password
volumes:
- ./pihole/etc-pihole:/etc/pihole
- ./pihole/etc-dnsmasq.d:/etc/dnsmasq.d
ports:
- 8053:80
networks:
openvpn_net:
ipv4_address: 10.0.0.3
dns:
- 127.0.0.1
- 1.1.1.1
cap_add:
- NET_ADMIN
openvpn-as:
container_name: openvpn-as
image: linuxserver/openvpn-as:2.7.4-ls28
restart: unless-stopped
environment:
- PUID=1000
- PGID=1000
- TZ=UTC
volumes:
- ./openvpn-as:/config
ports:
- 943:943
- 9443:9443
- 1194:1194/udp
networks:
openvpn_net:
ipv4_address: 10.0.0.4
dns:
- 127.0.0.1
- 10.0.0.3
cap_add:
- NET_ADMIN
networks:
openvpn_net:
name: openvpn_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