# ============================================================================== # TRAEFIK.YML - Configuracion Principal de Traefik # ============================================================================== # Proposito: Configuracion estatica de Traefik para el workspace # Mantenido por: DevOps-Agent # Actualizado: 2025-12-18 # ============================================================================== # ------------------------------------------------------------------------------ # CONFIGURACION GLOBAL # ------------------------------------------------------------------------------ global: checkNewVersion: false sendAnonymousUsage: false # ------------------------------------------------------------------------------ # API Y DASHBOARD # ------------------------------------------------------------------------------ api: dashboard: true insecure: true # Solo para desarrollo local # ------------------------------------------------------------------------------ # ENTRYPOINTS # ------------------------------------------------------------------------------ entryPoints: # HTTP - Puerto 80 web: address: ":80" http: redirections: entryPoint: to: websecure scheme: https permanent: true # HTTPS - Puerto 443 websecure: address: ":443" http: tls: certResolver: letsencrypt # Metrics - Puerto interno metrics: address: ":8082" # ------------------------------------------------------------------------------ # PROVIDERS # ------------------------------------------------------------------------------ providers: # Docker provider - descubre servicios automaticamente docker: endpoint: "unix:///var/run/docker.sock" exposedByDefault: false network: infra_shared watch: true # File provider - configuracion dinamica file: directory: "/etc/traefik/dynamic" watch: true # ------------------------------------------------------------------------------ # CERTIFICADOS TLS (Let's Encrypt) # ------------------------------------------------------------------------------ certificatesResolvers: letsencrypt: acme: email: "${ACME_EMAIL:-admin@example.com}" storage: "/letsencrypt/acme.json" httpChallenge: entryPoint: web # ------------------------------------------------------------------------------ # LOGGING # ------------------------------------------------------------------------------ log: level: INFO format: json filePath: "/var/log/traefik/traefik.log" accessLog: filePath: "/var/log/traefik/access.log" format: json bufferingSize: 100 filters: statusCodes: - "400-599" retryAttempts: true minDuration: "10ms" # ------------------------------------------------------------------------------ # METRICS (Prometheus) # ------------------------------------------------------------------------------ metrics: prometheus: entryPoint: metrics addEntryPointsLabels: true addServicesLabels: true addRoutersLabels: true buckets: - 0.1 - 0.3 - 1.2 - 5.0 # ------------------------------------------------------------------------------ # HEALTH CHECK # ------------------------------------------------------------------------------ ping: entryPoint: web # ------------------------------------------------------------------------------ # EXPERIMENTAL (opcional) # ------------------------------------------------------------------------------ # experimental: # plugins: # # Plugins de Traefik si se requieren