-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
34 lines (32 loc) · 1.04 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
version: "3.9"
services:
load-balancer:
image: "load-balancer:latest"
environment:
- LOAD_BALANCER_SERVER_LIST=[
{"ip":"http://host.docker.internal:${ECHO_SERVER_PORT_1}", "weight":5},
{"ip":"http://host.docker.internal:${ECHO_SERVER_PORT_2}", "weight":3},
{"ip":"http://host.docker.internal:${ECHO_SERVER_PORT_3}", "weight":1}]
ports:
- "8080:8080"
echo-server-1:
image: "echo-server:latest"
environment:
- ECHO_SERVER_PORT=${ECHO_SERVER_PORT_1}
- ECHO_SERVER_ID=${ECHO_SERVER_ID_1}
ports:
- "${ECHO_SERVER_PORT_1}:${ECHO_SERVER_PORT_1}"
echo-server-2:
image: "echo-server:latest"
environment:
- ECHO_SERVER_PORT=${ECHO_SERVER_PORT_2}
- ECHO_SERVER_ID=${ECHO_SERVER_ID_2}
ports:
- "${ECHO_SERVER_PORT_2}:${ECHO_SERVER_PORT_2}"
echo-server-3:
image: "echo-server:latest"
environment:
- ECHO_SERVER_PORT=${ECHO_SERVER_PORT_3}
- ECHO_SERVER_ID=${ECHO_SERVER_ID_3}
ports:
- "${ECHO_SERVER_PORT_3}:${ECHO_SERVER_PORT_3}"