Revert to Docker label-based Traefik config

File-based config added unnecessary complexity for this use case.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
primal
2026-02-02 16:27:19 -05:00
parent 479fc3f62c
commit 17d5bd1069
3 changed files with 36 additions and 69 deletions
+33 -2
View File
@@ -1,7 +1,7 @@
services:
pds-1440-news:
image: ghcr.io/bluesky-social/pds:0.4.204
container_name: atproto-1440news-pds
image: ghcr.io/bluesky-social/pds:0.4
container_name: pds-1440-news
restart: unless-stopped
volumes:
- ./data:/pds
@@ -9,6 +9,37 @@ services:
- pds.env
networks:
- proxy
labels:
- "traefik.enable=true"
# PDS API endpoint: pds.1440.news and 1440.news (alias)
- "traefik.http.routers.pds-1440-news.rule=Host(`pds.1440.news`) || Host(`1440.news`)"
- "traefik.http.routers.pds-1440-news.entrypoints=https"
- "traefik.http.routers.pds-1440-news.tls.certresolver=letsencrypt-dns"
- "traefik.http.routers.pds-1440-news.priority=10"
# Wildcard for account handles: *.1440.news (requires DNS challenge)
- "traefik.http.routers.pds-1440-news-handles.rule=HostRegexp(`^.+\\.1440\\.news$$`)"
- "traefik.http.routers.pds-1440-news-handles.entrypoints=https"
- "traefik.http.routers.pds-1440-news-handles.tls.certresolver=letsencrypt-dns"
- "traefik.http.routers.pds-1440-news-handles.tls.domains[0].main=1440.news"
- "traefik.http.routers.pds-1440-news-handles.tls.domains[0].sans=*.1440.news"
- "traefik.http.routers.pds-1440-news-handles.priority=1"
# HTTP to HTTPS redirect
- "traefik.http.routers.pds-1440-news-redirect.rule=Host(`pds.1440.news`) || Host(`1440.news`)"
- "traefik.http.routers.pds-1440-news-redirect.entrypoints=http"
- "traefik.http.routers.pds-1440-news-redirect.middlewares=https-redirect"
- "traefik.http.routers.pds-1440-news-handles-redirect.rule=HostRegexp(`^.+\\.1440\\.news$$`)"
- "traefik.http.routers.pds-1440-news-handles-redirect.entrypoints=http"
- "traefik.http.routers.pds-1440-news-handles-redirect.middlewares=https-redirect"
- "traefik.http.routers.pds-1440-news-handles-redirect.priority=1"
# Shared middleware
- "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https"
- "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true"
# Service port
- "traefik.http.services.pds-1440-news.loadbalancer.server.port=3000"
# Local development
- "traefik.http.routers.pds-1440-news-local.rule=Host(`pds.1440.localhost`) || Host(`1440.localhost`)"
- "traefik.http.routers.pds-1440-news-local.entrypoints=http"
- "traefik.http.routers.pds-1440-news-local.priority=10"
networks:
proxy: