WIP:dataplaneapi
authorKai Moritz <kai@juplo.de>
Sun, 17 Sep 2023 09:04:10 +0000 (11:04 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 17 Sep 2023 09:04:10 +0000 (11:04 +0200)
docker-compose.yml
haproxy.cfg

index e4ddbb8..25bc6c2 100644 (file)
@@ -31,7 +31,7 @@ services:
   haproxy:
     image: haproxytech/haproxy-debian:2.8
     volumes:
-      - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
+      - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:rw
       - ./sharding.map:/usr/local/etc/haproxy/sharding.map:ro
     sysctls:
       net.ipv4.ip_unprivileged_port_start: 0
@@ -39,6 +39,7 @@ services:
       - 8080:8400
       - 8401:8401
       - 8404:8404
+      - 5555:5555
 
   backend-1:
     image: juplo/chat-backend:0.0.1-SNAPSHOT
index d78a358..6c451ce 100644 (file)
@@ -36,3 +36,10 @@ backend backend_2
 backend backend_3
   server b3 backend-3:8080 check
 
+userlist haproxy-dataplaneapi
+  user juplo insecure-password juplo
+
+program api
+   command /usr/bin/dataplaneapi --host 0.0.0.0 --port 5555 --haproxy-bin /usr/sbin/haproxy --config-file /usr/local/etc/haproxy/haproxy.cfg --reload-cmd "kill -SIGUSR2 1" --restart-cmd "kill -SIGUSR2 1" --reload-delay 5 --userlist haproxy-dataplaneapi
+   no option start-on-reload
+