Files
HiveGrid-Wireframes/hivegrid-cloud/infra/sentry/traefik.labels.yml
T

60 lines
3.1 KiB
YAML

# Canonical Traefik label-set for the self-hosted Sentry stack.
#
# This file is a YAML fragment (NOT a runnable compose file by itself). It's
# provided as documentation of which labels we attach to the `nginx` service
# of the upstream getsentry/self-hosted compose. The same labels are already
# embedded inline in `docker-compose.override.yml`, which is what actually
# ships to the runtime; this fragment exists so the routing contract is
# searchable and reviewable in one place.
#
# Coolify (v4) ships Traefik v3.6 with two entrypoints (`http`:80, `https`:443)
# and a default ACME cert-resolver named `letsencrypt`. The labels below match
# that convention.
#
# Host: sentry.boiler.saas-ctrl.com -> DNS A record points at 46.225.5.93.
# When a different staging domain is chosen, update both this file and the
# inline labels in docker-compose.override.yml (single source of truth lives
# in the override file; this fragment is a copy for review).
# ---- ROUTERS ----------------------------------------------------------------
# Primary HTTPS router — terminates TLS, forwards to nginx:80.
traefik.enable: "true"
traefik.docker.network: "coolify"
traefik.http.routers.sentry.rule: "Host(`sentry.boiler.saas-ctrl.com`)"
traefik.http.routers.sentry.entrypoints: "https"
traefik.http.routers.sentry.tls: "true"
traefik.http.routers.sentry.tls.certresolver: "letsencrypt"
traefik.http.services.sentry.loadbalancer.server.port: "80"
# HTTP -> HTTPS redirect (port 80 catches plain-HTTP hits and 308s them to TLS).
traefik.http.routers.sentry-http.rule: "Host(`sentry.boiler.saas-ctrl.com`)"
traefik.http.routers.sentry-http.entrypoints: "http"
traefik.http.routers.sentry-http.middlewares: "sentry-https-redirect"
traefik.http.middlewares.sentry-https-redirect.redirectscheme.scheme: "https"
# ---- OPTIONAL: rate-limit middleware (apply if abuse is detected) -----------
#
# Sentry's DSN is by design public (lives in the browser bundle); the Relay
# `config.yml` enforces the real per-project ingest rate-limit. The labels
# below are a *secondary* defence-in-depth that you can switch on by adding
# `sentry-ratelimit` to the router's `middlewares` list.
#
# traefik.http.middlewares.sentry-ratelimit.ratelimit.average: "200"
# traefik.http.middlewares.sentry-ratelimit.ratelimit.burst: "400"
# traefik.http.middlewares.sentry-ratelimit.ratelimit.period: "1s"
# ---- OPTIONAL: security headers ---------------------------------------------
#
# Sentry's own nginx already sets sensible CSP/HSTS for its UI. If you put
# Cloudflare or another proxy in front, this middleware tightens the response
# at the Traefik edge — turn on by appending `sentry-secure-headers` to the
# router's `middlewares`.
#
# traefik.http.middlewares.sentry-secure-headers.headers.stsSeconds: "31536000"
# traefik.http.middlewares.sentry-secure-headers.headers.stsIncludeSubdomains: "true"
# traefik.http.middlewares.sentry-secure-headers.headers.stsPreload: "true"
# traefik.http.middlewares.sentry-secure-headers.headers.contentTypeNosniff: "true"
# traefik.http.middlewares.sentry-secure-headers.headers.browserXssFilter: "true"
# traefik.http.middlewares.sentry-secure-headers.headers.referrerPolicy: "no-referrer"