update traefik for host mode and change keepalived for traefik

This commit is contained in:
admin 2026-01-28 00:36:25 -07:00
parent ec699ca95d
commit 24b8c9d1f6
2 changed files with 16 additions and 15 deletions

View file

@ -28,14 +28,15 @@ services:
traefik: traefik:
image: traefik:latest image: traefik:latest
container_name: traefik container_name: traefik
network_mode: host
cpus: 1.0 cpus: 1.0
mem_limit: "1024m" mem_limit: "1024m"
mem_reservation: "128m" mem_reservation: "128m"
restart: always restart: always
ports: #ports:
- "80:80" # HTTP # - "80:80" # HTTP
- "443:443" # HTTPS # - "443:443" # HTTPS
- "888:8080" # Traefik Dashboard (optional, password-protect in production!) # - "888:8080" # Traefik Dashboard (optional, password-protect in production!)
command: command:
- "--api.dashboard=true" - "--api.dashboard=true"
- "--api.insecure=true" # Remove or secure in prod - "--api.insecure=true" # Remove or secure in prod
@ -67,12 +68,12 @@ services:
- "/var/run/docker.sock:/var/run/docker.sock:ro" - "/var/run/docker.sock:/var/run/docker.sock:ro"
- "/docker/core/traefik/letsencrypt:/letsencrypt" - "/docker/core/traefik/letsencrypt:/letsencrypt"
- "${REPO_ROOT}/traefik/dynamic:/etc/traefik/dynamic" - "${REPO_ROOT}/traefik/dynamic:/etc/traefik/dynamic"
networks: #networks:
- guac_external # - guac_external
- komodo_external # - komodo_external
- ansible_external # - ansible_external
- dns_external # - dns_external
- homepage_external # - homepage_external
# DDNS UPDATER (IP Updates) # DDNS UPDATER (IP Updates)
ddns: ddns:

View file

@ -1,12 +1,12 @@
global_defs { global_defs {
router_id 51 router_id 50
script_user root script_user root
enable_script_security enable_script_security
} }
vrrp_script chk_komodo { vrrp_script chk_traefik {
# CONTAINER PATH (Inside the mount) # CONTAINER PATH (Inside the mount)
script "/checks/check_komodo.sh" script "/usr/bin/curl -f http://localhost:80/"
interval 2 interval 2
weight -5 weight -5
fall 2 fall 2
@ -16,7 +16,7 @@ vrrp_script chk_komodo {
vrrp_instance VI_1 { vrrp_instance VI_1 {
state {{STATE}} state {{STATE}}
interface eth0 interface eth0
virtual_router_id 51 virtual_router_id 50
priority {{PRIORITY}} priority {{PRIORITY}}
advert_int 1 advert_int 1
@ -34,6 +34,6 @@ vrrp_instance VI_1 {
} }
track_script { track_script {
chk_komodo chk_traefik
} }
} }