feat: Working config for HAProxy mit mapping via `X-Shard` (casesensitive!)
[demos/kafka/chat] / docker-compose.yml
index 9f476d0..28fca8b 100644 (file)
@@ -84,6 +84,30 @@ services:
     depends_on:
       - kafka-0
 
+  haproxy:
+    image: haproxy:2.7
+    volumes:
+      - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
+      - ./sharding.map:/usr/local/etc/haproxy/sharding.map:ro
+    sysctls:
+      net.ipv4.ip_unprivileged_port_start: 0
+    ports:
+      - 8080:8400
+      - 8401:8401
+      - 8404:8404
+
+  backend-1:
+    image: jmalloc/echo-server:latest
+    ports:
+      - 8081:8080
+  backend-2:
+    image: jmalloc/echo-server:latest
+    ports:
+      - 8082:8080
+  backend-3:
+    image: jmalloc/echo-server:latest
+    ports:
+      - 8083:8080
 
   setup:
     image: juplo/toolbox