Skip to content

Instantly share code, notes, and snippets.

@dyindude
Last active December 14, 2018 17:14
Show Gist options
  • Save dyindude/835ae1d6e11da6de67632c110f9f0fe4 to your computer and use it in GitHub Desktop.
Save dyindude/835ae1d6e11da6de67632c110f9f0fe4 to your computer and use it in GitHub Desktop.
pihole configuration
#nginx/docker-compose.yml
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
restart: always
networks:
- webapps
ports:
- 80:80
- 443:443
volumes:
- ./nginx-certs:/etc/nginx/certs:ro
- nginx-vhost:/etc/nginx/vhost.d
- nginx-html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
volumes:
nginx-certs:
driver: local
nginx-vhost:
driver: local
nginx-html:
driver: local
networks:
webapps:
driver: bridge
#pihole/docker-compose.yml
version: "3"
services:
pihole:
image: diginc/pi-hole:debian
ports:
- "192.168.1.9:53:53/tcp"
- "192.168.1.9:53:53/udp"
- "80"
environment:
PROXY_LOCATION: pihole
VIRTUAL_HOST: pihole.host.site.domain.tld
VIRTUAL_PORT: 80
WEBPASSWORD: changeme
IPV6: "False"
TZ: CST6CDT
ServerIP: 192.168.1.9
extra_hosts:
- 'host:192.168.1.9'
- 'host.site.domain.tld:192.168.1.9'
- 'pihole.host.site.domain.tld:192.168.1.9'
- 'git.host.site.domain.tld:192.168.1.9'
volumes:
- pihole-config:/etc/pihole/
- dnsmasq:/etc/dnsmasq.d/
restart: always
networks:
- webapps
volumes:
pihole-config:
driver: local
labels:
- "tld.domain.services.volume"
dnsmasq:
driver: local
labels:
- "tld.domain.services.volume"
networks:
webapps:
external:
name: nginx_webapps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment