Jafner.net/homelab/stacks/traefik/README.md
Joey Hafner 85d3343285
Some checks failed
SSH and echo to file / ssh (push) Failing after 4s
Fix improper escaping special characters (`)
2024-10-24 12:40:39 -07:00

18 lines
859 B
Markdown

### The `web` Network
Created with `docker network create --driver=bridge --subnet=172.20.0.0/23 --ip-range=172.20.1.0/24 web`
Previous version was naive, and had a subnet equal in size to the IP range. This meant that we would occasionally encounter address colisions between services which needed static IPs, and those handed IPs automatically.
### Useful Labels
Basic web-facing service:
- ```traefik.http.routers.<router-name>.rule=Host(`<subdomain>.jafner.net`)```
- `traefik.http.routers.<router-name>.tls.certresolver=lets-encrypt`
Restrict access to IPs in list defined in [`./config/config_addons.yaml`](./config/config_addons.yaml):
- `traefik.http.routers.<router-name>.middlewares=lan-only@file`
Explicitly set the container-side port Traefik should route traffic to:
- `traefik.http.services.<service-name>.loadbalancer.server.port=1234`