commit 9b0dcbfa9811208dfd1741210f1e9fdff024c475 parent af6a8bcc9bd629a7bc85f314085498f381adab5e Author: MTRNord <mtrnord1@gmail.com> Date: Mon, 4 Sep 2023 23:47:14 +0200 Try nginx instead of haproxy Diffstat:
| M | nixos/worker-1/configuration.nix | | | 19 | ++++++++++++++++++- |
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/nixos/worker-1/configuration.nix b/nixos/worker-1/configuration.nix @@ -344,10 +344,27 @@ }; }; }; + streamConfig = '' + match server_ok { + status 200; + } + upstream postgres { + zone postgres 64k; + server 10.100.0.2:5432; + server 10.100.0.1:5432; + } + server { + listen 127.0.0.1:5000 tcp; + listen 100.64.0.1:5000 tcp; + listen 10.100.12.1:5000 tcp; + proxy_pass postgres; + health_check port=8008 interval=3 fails=3 passes=2 mandatory persistent match=server_ok; + } + ''; }; haproxy = { - enable = true; + enable = false; config = '' global maxconn 300