Ajout de l'acces par ip

This commit is contained in:
cedric 2026-01-15 14:51:21 +00:00
parent ae834b1c97
commit 839587dbe0

View file

@ -0,0 +1,24 @@
version: "3.9"
services:
blocked-ip:
image: nginx:alpine
container_name: public-ip
volumes:
- /srv/docker/public-ip/:/usr/share/nginx/html:ro
labels:
- "traefik.enable=true"
# Router pour l'IPv6 HTTP direct
- "traefik.http.routers.blocked-ip-http6.rule=Host(`[2001:db8::1]`)"
- "traefik.http.routers.blocked-ip-http6.entrypoints=web"
- "traefik.http.routers.blocked-ip-http6.service=blocked-ip-service"
# Router pour l'IPv4 HTTP direct
- "traefik.http.routers.blocked-ip-http4.rule=Host(`109.109.109.109`)"
- "traefik.http.routers.blocked-ip-http4.entrypoints=web"
- "traefik.http.routers.blocked-ip-http4.service=blocked-ip-service"
# Service commun pour les deux IPs
- "traefik.http.services.blocked-ip-service.loadbalancer.server.port=80"