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

auto networking

parent 10c9dab3
global
maxconn 4096
log stdout format raw local0
defaults
log global
mode http
timeout connect 5000ms
timeout client 50000ms
......@@ -9,9 +11,9 @@ defaults
frontend main
bind *:8080
default_backend backend
default_backend greeter_backend
backend backend
backend greeter_backend
balance roundrobin
server greeter-1 172.19.0.3:8001
server greeter-2 172.19.0.2:8002
server greeter-1 first-greeting:8001
server greeter-2 second-greeting:8002
......@@ -6,11 +6,15 @@ services:
image: first-greeter
ports:
- "8001:8001"
networks:
- greeting_network
second-greeting:
image: second-greeter
ports:
- "8002:8002"
networks:
- greeting_network
load-balancer:
image: haproxy
......@@ -21,4 +25,8 @@ services:
depends_on:
- first-greeting
- second-greeting
\ No newline at end of file
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