From 3f5179c194f4cdda0120f4a8c76aa069903628f0 Mon Sep 17 00:00:00 2001 From: Richie Cahill Date: Fri, 5 Jul 2024 13:25:40 -0400 Subject: [PATCH] moved jeevesjr haproxy.cfg to the nix repo --- systems/jeeves-jr/docker/haproxy.cfg | 40 ++++++++++++++++++++++++++++ systems/jeeves-jr/docker/web.nix | 2 +- systems/jeeves/docker/haproxy.cfg | 2 +- 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 systems/jeeves-jr/docker/haproxy.cfg diff --git a/systems/jeeves-jr/docker/haproxy.cfg b/systems/jeeves-jr/docker/haproxy.cfg new file mode 100644 index 0000000..493cc6d --- /dev/null +++ b/systems/jeeves-jr/docker/haproxy.cfg @@ -0,0 +1,40 @@ +global + log stdout format raw local0 + +defaults + log global + mode http + retries 3 + maxconn 2000 + timeout connect 5s + timeout client 50s + timeout server 50s + timeout http-request 10s + timeout http-keep-alive 2s + timeout queue 5s + timeout tunnel 2m + timeout client-fin 1s + timeout server-fin 1s + + +#Application Setup +frontend ContentSwitching + bind *:80 + bind *:443 ssl crt /etc/ssl/certs/cloudflare.pem + mode http + + # tmmworkshop.com + acl host_mirror hdr(host) -i mirror.tmmworkshop.com jeeves + acl host_uptime_kuma hdr(host) -i uptimekuma-jeevesjr.tmmworkshop.com + + use_backend mirror_nodes if host_mirror + use_backend uptime_kuma_nodes if host_uptime_kuma + +# tmmworkshop.com +backend mirror_nodes + mode http + server server arch_mirror:80 + +backend uptime_kuma_nodes + mode http + server server uptime_kuma:3001 diff --git a/systems/jeeves-jr/docker/web.nix b/systems/jeeves-jr/docker/web.nix index 45b29f7..336ef1d 100644 --- a/systems/jeeves-jr/docker/web.nix +++ b/systems/jeeves-jr/docker/web.nix @@ -18,7 +18,7 @@ }; volumes = [ "/ZFS/Main/Docker/jeeves-jr/haproxy/cloudflare.pem:/etc/ssl/certs/cloudflare.pem" - "/ZFS/Main/Docker/jeeves-jr/haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg" + "${./haproxy.cfg}:/usr/local/etc/haproxy/haproxy.cfg" ]; dependsOn = [ "arch_mirror" ]; extraOptions = [ "--network=web" ]; diff --git a/systems/jeeves/docker/haproxy.cfg b/systems/jeeves/docker/haproxy.cfg index 796b20d..1b5fd54 100644 --- a/systems/jeeves/docker/haproxy.cfg +++ b/systems/jeeves/docker/haproxy.cfg @@ -29,7 +29,7 @@ frontend ContentSwitching acl host_dndrules hdr(host) -i dndrules.tmmworkshop.com acl host_grafana hdr(host) -i grafana.tmmworkshop.com acl host_filebrowser hdr(host) -i filebrowser.tmmworkshop.com - acl host_uptime_kuma hdr(host) -i uptimekuma.tmmworkshop.com + acl host_uptime_kuma hdr(host) -i uptimekuma-jeeves.tmmworkshop.com use_backend mirror_nodes if host_mirror use_backend dndrules_nodes if host_dndrules