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>
This commit is contained in:
+67
@@ -0,0 +1,67 @@
|
||||
# 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"
|
||||
Reference in New Issue
Block a user