- traefik/compose.yml: flip --api.dashboard=true so Traefik's internal API is reachable. No entrypoint named "traefik" is defined, so Traefik auto-creates its default one on :8080 - not published to the host (only 80/443 are), so it's reachable only from other containers on falcon_network, i.e. exactly (and only) pulsenode. - pulsenode/config.yml: adds a system widget and swaps the plain Traefik docker card for the real traefik widget (router/entrypoint/ middleware view via that now-enabled API), both at the top of Services. Verified locally before deploying: a plain container (no pid: host, no /proc,/sys mounts) already reports host-accurate CPU count, memory total, and root disk usage via systeminformation, since Docker doesn't namespace /proc/stat, /proc/meminfo, or overlayfs df by default. No privilege escalation needed for the system widget after all - tested side by side against the real host's nproc/free/df output. Also confirmed the merged config.yml validates against the app's own zod schema, not just as YAML.
52 lines
1.8 KiB
YAML
52 lines
1.8 KiB
YAML
services:
|
|
traefik:
|
|
image: traefik:v3
|
|
container_name: traefik
|
|
command:
|
|
- "--api.dashboard=true"
|
|
- "--ping=true"
|
|
- "--log.level=INFO"
|
|
- "--accesslog=true"
|
|
- "--global.sendAnonymousUsage=false"
|
|
- "--global.checkNewVersion=true"
|
|
- "--providers.docker=true"
|
|
- "--providers.docker.exposedbydefault=false"
|
|
- "--providers.docker.network=${NETWORK_NAME}"
|
|
- "--providers.file.directory=/etc/traefik/dynamic"
|
|
- "--providers.file.watch=true"
|
|
- "--entrypoints.web.address=:80"
|
|
- "--entrypoints.web-secure.address=:443"
|
|
- "--entrypoints.web.http.redirections.entryPoint.to=web-secure"
|
|
- "--entrypoints.web.http.redirections.entryPoint.scheme=https"
|
|
- "--entrypoints.web.http.redirections.entryPoint.permanent=true"
|
|
- "--entrypoints.web-secure.http.middlewares=security-headers@file,fail2ban@file"
|
|
- "--certificatesresolvers.resolver.acme.tlschallenge=true"
|
|
- "--certificatesresolvers.resolver.acme.email=${ACME_EMAIL}"
|
|
- "--certificatesresolvers.resolver.acme.storage=/letsencrypt/acme.json"
|
|
- "--experimental.plugins.fail2ban.moduleName=github.com/tomMoulard/fail2ban"
|
|
- "--experimental.plugins.fail2ban.version=v0.9.0"
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ../.data/traefik/letsencrypt:/letsencrypt
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- ./dynamic:/etc/traefik/dynamic:ro
|
|
restart: always
|
|
healthcheck:
|
|
test: ["CMD", "traefik", "healthcheck", "--ping"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 10s
|
|
networks:
|
|
- compose_network
|
|
- coolify_network
|
|
networks:
|
|
compose_network:
|
|
name: ${NETWORK_NAME}
|
|
external: true
|
|
coolify_network:
|
|
name: coolify
|
|
external: true
|