I am unable to reach one docker container using Traefik:
The config of the docker container that is unreachable is:
version: "3"
# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
- "8153:80/tcp"
environment:
TZ: 'Europe/Amsterdam'
VIRTUAL_HOST: pi-hole.docker-core.domain.com
# WEBPASSWORD: 'set a secure password here or it will be random'
# Volumes store your data between container upgrades
volumes:
- '/opt/pi-hole/etc-pihole/:/etc/pihole/'
- '/opt/pi-hole/etc-dnsmasq.d/:/etc/dnsmasq.d/'
dns:
- 127.0.0.1
- 8.8.8.8
# Recommended but not required (DHCP needs NET_ADMIN)
# https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
cap_add:
- NET_ADMIN
restart: unless-stopped
labels:
- traefik.enable=true
- traefik.http.routers.pi-hole.rule=Host(`pi-hole.docker-core.domain.com`)
- traefik.http.services.pi-hole.loadbalancer.server.port=80
This is my Traefik config:
version: '3'
services:
reverse-proxy:
# The official v2.0 Traefik docker image
image: traefik:v2.0
# Enables the web UI and tells Traefik to listen to docker
command: --api.insecure=true --providers.docker --providers.docker.defaultRule="Host(`{{ trimPrefix `/` .Name }}.docker-core.domain.com`)"
ports:
# The HTTP port
- "80:80"
# The Web UI (enabled by --api.insecure=true)
- "8080:8080"
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
Whenever I visit pi-hole.docker-core.domain.com I get: Gateway Timeout