configuracion actual
This commit is contained in:
81
traefik/traefik.yml
Executable file
81
traefik/traefik.yml
Executable file
@@ -0,0 +1,81 @@
|
||||
# Configuración estática de Traefik
|
||||
# Este archivo se carga al iniciar Traefik y define la configuración base
|
||||
|
||||
# API y Dashboard
|
||||
api:
|
||||
dashboard: true # Habilita el dashboard web
|
||||
insecure: false # Requiere autenticación (configurada en dynamic/)
|
||||
|
||||
# Entry Points - Puntos de entrada para el tráfico
|
||||
entryPoints:
|
||||
web:
|
||||
address: ":80"
|
||||
# Redirección automática HTTP -> HTTPS
|
||||
http:
|
||||
redirections:
|
||||
entryPoint:
|
||||
to: websecure
|
||||
scheme: https
|
||||
permanent: true
|
||||
|
||||
websecure:
|
||||
address: ":443"
|
||||
http:
|
||||
tls:
|
||||
certResolver: letsencrypt # Usa Let's Encrypt para SSL
|
||||
|
||||
# Entry point para métricas (opcional)
|
||||
metrics:
|
||||
address: ":8082"
|
||||
|
||||
# Providers - De dónde Traefik obtiene su configuración
|
||||
providers:
|
||||
# Docker provider - Auto-descubre contenedores
|
||||
docker:
|
||||
endpoint: "unix:///var/run/docker.sock"
|
||||
exposedByDefault: false # Solo expone contenedores con labels específicas
|
||||
network: traefik-network # Red Docker para Traefik
|
||||
watch: true # Detecta cambios en tiempo real
|
||||
|
||||
# File provider - Configuraciones dinámicas desde archivos
|
||||
file:
|
||||
directory: /etc/traefik/dynamic
|
||||
watch: true # Recarga automáticamente si hay cambios
|
||||
|
||||
# Certificados SSL automáticos con Let's Encrypt
|
||||
certificatesResolvers:
|
||||
letsencrypt:
|
||||
acme:
|
||||
email: jodarioel87@gmail.com # Email para notificaciones de Let's Encrypt
|
||||
storage: /letsencrypt/acme.json
|
||||
# DNS Challenge para certificados wildcard
|
||||
dnsChallenge:
|
||||
provider: cloudflare
|
||||
resolvers:
|
||||
- "1.1.1.1:53"
|
||||
- "1.0.0.1:53"
|
||||
delayBeforeCheck: 10s
|
||||
|
||||
# Logging
|
||||
log:
|
||||
level: INFO # DEBUG, INFO, WARN, ERROR
|
||||
filePath: /var/log/traefik/traefik.log
|
||||
format: json
|
||||
|
||||
# Access logs
|
||||
accessLog:
|
||||
filePath: /var/log/traefik/access.log
|
||||
format: json
|
||||
bufferingSize: 100
|
||||
|
||||
# Métricas (opcional - para Prometheus)
|
||||
metrics:
|
||||
prometheus:
|
||||
addEntryPointsLabels: true
|
||||
addServicesLabels: true
|
||||
entryPoint: metrics
|
||||
|
||||
# Configuración global
|
||||
global:
|
||||
checkNewVersion: true
|
||||
sendAnonymousUsage: false
|
||||
Reference in New Issue
Block a user