Files
pds/docker-compose.yml
2026-01-26 16:33:04 -05:00

43 lines
1.9 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
- "traefik.http.routers.pds-1440-news.rule=Host(`pds.1440.news`)"
- "traefik.http.routers.pds-1440-news.entrypoints=https"
- "traefik.http.routers.pds-1440-news.tls.certresolver=letsencrypt"
# Wildcard for account handles: *.1440.news
- "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"
- "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`)"
- "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`)"
- "traefik.http.routers.pds-1440-news-local.entrypoints=http"
networks:
proxy:
external: true