Commit c91bc353 authored by mohammad.salama's avatar mohammad.salama

auto networking

parent 10c9dab3
global global
maxconn 4096 maxconn 4096
log stdout format raw local0
defaults defaults
log global
mode http mode http
timeout connect 5000ms timeout connect 5000ms
timeout client 50000ms timeout client 50000ms
...@@ -9,9 +11,9 @@ defaults ...@@ -9,9 +11,9 @@ defaults
frontend main frontend main
bind *:8080 bind *:8080
default_backend backend default_backend greeter_backend
backend backend backend greeter_backend
balance roundrobin balance roundrobin
server greeter-1 172.19.0.3:8001 server greeter-1 first-greeting:8001
server greeter-2 172.19.0.2:8002 server greeter-2 second-greeting:8002
...@@ -6,11 +6,15 @@ services: ...@@ -6,11 +6,15 @@ services:
image: first-greeter image: first-greeter
ports: ports:
- "8001:8001" - "8001:8001"
networks:
- greeting_network
second-greeting: second-greeting:
image: second-greeter image: second-greeter
ports: ports:
- "8002:8002" - "8002:8002"
networks:
- greeting_network
load-balancer: load-balancer:
image: haproxy image: haproxy
...@@ -21,4 +25,8 @@ services: ...@@ -21,4 +25,8 @@ services:
depends_on: depends_on:
- first-greeting - first-greeting
- second-greeting - second-greeting
networks:
- greeting_network
networks:
greeting_network:
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment