Skip to content

Instantly share code, notes, and snippets.

@ideaengine007
Created May 22, 2024 20:43
Show Gist options
  • Save ideaengine007/7ed5c2123df34fa27ed0b75a501284ec to your computer and use it in GitHub Desktop.
Save ideaengine007/7ed5c2123df34fa27ed0b75a501284ec to your computer and use it in GitHub Desktop.
Docker Compose YAML for observing Traefik as a reverse proxy allowing access with a custom host header
services:
reverse-proxy:
image: traefik:v2.10
command: --providers.docker --entrypoints.web.address=:80
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
nginx:
image: nginx:latest
labels:
- "traefik.http.routers.nginx.entrypoints=web"
- "traefik.http.routers.nginx.rule=Host(`nswashere.local`)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment