Files
pds/traefik.yml
primal 479fc3f62c Move Traefik routing to file-based config
Extract routing rules from docker-compose labels to traefik.yml.
Traefik now loads this file via volume mount.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 16:19:51 -05:00

68 lines
1.8 KiB
YAML

# Traefik routing for PDS (1440.news)
http:
routers:
# PDS API: pds.1440.news
pds-1440-news:
rule: "Host(`pds.1440.news`)"
entryPoints: [https]
tls:
certResolver: letsencrypt-dns
service: pds-1440-news
priority: 10
# PDS API: 1440.news (only /xrpc and /.well-known)
pds-1440-news-api:
rule: "Host(`1440.news`) && (PathPrefix(`/xrpc`) || PathPrefix(`/.well-known`))"
entryPoints: [https]
tls:
certResolver: letsencrypt-dns
service: pds-1440-news
priority: 20
# Wildcard handles: *.1440.news
pds-1440-news-handles:
rule: "HostRegexp(`^.+\\.1440\\.news$$`)"
entryPoints: [https]
tls:
certResolver: letsencrypt-dns
domains:
- main: "1440.news"
sans:
- "*.1440.news"
service: pds-1440-news
priority: 1
# HTTP redirects
pds-1440-news-redirect:
rule: "Host(`pds.1440.news`)"
entryPoints: [http]
middlewares: [https-redirect]
service: pds-1440-news
pds-1440-news-api-redirect:
rule: "Host(`1440.news`) && (PathPrefix(`/xrpc`) || PathPrefix(`/.well-known`))"
entryPoints: [http]
middlewares: [https-redirect]
service: pds-1440-news
priority: 20
pds-1440-news-handles-redirect:
rule: "HostRegexp(`^.+\\.1440\\.news$$`)"
entryPoints: [http]
middlewares: [https-redirect]
service: pds-1440-news
priority: 1
# Local development
pds-1440-news-local:
rule: "Host(`pds.1440.localhost`) || Host(`1440.localhost`)"
entryPoints: [http]
service: pds-1440-news
priority: 10
services:
pds-1440-news:
loadBalancer:
servers:
- url: "http://atproto-1440news-pds:3000"