Files
pds/docker-compose.yml
2026-01-26 17:10:51 -05:00

47 lines
2.3 KiB
YAML

services:
pds-1440-news:
image: ghcr.io/bluesky-social/pds:0.4
container_name: pds-1440-news
restart: unless-stopped
volumes:
- ./data:/pds
env_file:
- 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:
external: true