-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
49 lines (43 loc) · 1.07 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: '3.8'
services:
app1:
image: nginx:alpine
ports:
- "8101:80"
networks:
mynetwork:
ipv4_address: 10.10.0.2
command: /bin/sh -c "echo '<h1>APP 1</h1>' > /usr/share/nginx/html/index.html; nginx -g 'daemon off;'"
app2:
image: nginx:alpine
ports:
- "8102:80"
networks:
mynetwork:
ipv4_address: 10.10.0.3
command: /bin/sh -c "echo '<h1>App 2</h1>' > /usr/share/nginx/html/index.html; nginx -g 'daemon off;'"
app3:
image: nginx:alpine
ports:
- "8103:80"
networks:
mynetwork:
ipv4_address: 10.10.0.4
command: /bin/sh -c "echo '<h1>app 3</h1>' > /usr/share/nginx/html/index.html; nginx -g 'daemon off;'"
lb:
image: nginx:alpine
volumes:
- "./lb-conf/default.conf:/etc/nginx/conf.d/default.conf"
networks:
mynetwork:
ipv4_address: 10.10.0.5
ports:
- "8100:80"
command: /bin/sh -c "nginx -g 'daemon off;'"
networks:
mynetwork:
driver: bridge
ipam:
driver: default
config:
- subnet: 10.10.0.0/24