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

View file

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