Files
oneimg/docker-compose.traefik.yml

23 lines
852 B
YAML

services:
oneimg:
ports: !reset []
expose:
- "${SERVER_PORT:-8080}"
networks:
- frontend
labels:
- "traefik.enable=true"
- "traefik.http.routers.oneimg.rule=Host(`${TRAEFIK_HOST:-img.example.com}`)"
- "traefik.http.routers.oneimg.entrypoints=${TRAEFIK_ENTRYPOINTS:-https}"
- "traefik.http.routers.oneimg.tls=${TRAEFIK_TLS:-true}"
- "traefik.http.routers.oneimg.tls.certresolver=${TRAEFIK_CERTRESOLVER:-cloudflare}"
- "traefik.http.routers.oneimg.priority=${TRAEFIK_PRIORITY:-10}"
- "traefik.http.routers.oneimg.middlewares=${TRAEFIK_MIDDLEWARES:-real-ip@file}"
- "traefik.http.routers.oneimg.service=oneimg"
- "traefik.http.services.oneimg.loadbalancer.server.port=${SERVER_PORT:-8080}"
networks:
frontend:
external: true
name: ${TRAEFIK_NETWORK:-frontend}