Okay after hours of reading I decided to use Pi-Hole for local DNSing. Thought about installing it into the same Dockerstack as my Caddy runs but I can’t deploy because both containers want to use the same containers:
Docker Compose looks like this:
version: '3'
services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: always
environment:
- WEBSOCKET_ENABLED=true # Enable WebSocket notifications.
- ADMIN_TOKEN=#aoufhorwpiüjijqjfpomrfjpqiopejomfpojmrfeI
# - SIGNUPS_ALLOWED=false
- DOMAIN=https://vaultwarden.mine.duckdns.org
# - SIGNUPS_ALLOWED=true
# - SIGNUPS_VERIFY=true
# - SIGNUPS_DOMAINS_WHITELIST=example.com,example.net,example.org
volumes:
- ./vw-data:/data
caddy:
image: caddy:2
container_name: caddy
restart: always
ports:
- 80:80 # Needed for the ACME HTTP-01 challenge.
- 443:443
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy-config:/config
- ./caddy-data:/data
environment:
- DOMAIN=mine.duckdns.org # Your domain.
- EMAIL=mail@alexander-bloch.de # The email address to use for ACME registration.
- LOG_FILE=/data/access.log
portainer:
image: portainer/portainer-ce:latest
container_name: portainer-ce
restart: always
ports:
- 9000:9000
- 8000:8000
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./portainer_data:/data
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
pihole:
container_name: pihole
image: pihole/pihole:latest
# For DHCP it is recommended to remove these ports and instead add: network_mode: "host"
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp" # Only required if you are using Pi-hole as your DHCP server
- "80:80/tcp"
environment:
TZ: 'America/Chicago'
WEBPASSWORD: PASSWORD
# Volumes store your data between container upgrades
volumes:
- './etc-pihole:/etc/pihole'
- './etc-dnsmasq.d:/etc/dnsmasq.d'
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN # Required if you are using Pi-hole as your DHCP server, else not needed
restart: unless-stopped
Do I need to create a own LXC for the Pi-Hole Server?