-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
72 lines (68 loc) · 1.57 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
version: "3.5"
services :
webapp1:
container_name: ${WEBAPP_1_NAME}
build:
context: ./webapp
dockerfile: Dockerfile
networks:
heig:
ipv4_address: ${WEBAPP_1_IP}
ports:
- "4000:3000"
environment:
- TAG=${WEBAPP_1_NAME}
- SERVER_IP=${WEBAPP_1_IP}
webapp2:
container_name: ${WEBAPP_2_NAME}
build:
context: ./webapp
dockerfile: Dockerfile
networks:
heig:
ipv4_address: ${WEBAPP_2_IP}
ports:
- "4001:3000"
environment:
- TAG=${WEBAPP_2_NAME}
- SERVER_IP=${WEBAPP_2_IP}
webapp3:
container_name: ${WEBAPP_3_NAME}
build:
context: ./webapp
dockerfile: Dockerfile
networks:
heig:
ipv4_address: ${WEBAPP_3_IP}
ports:
- "4002:3000"
environment:
- TAG=${WEBAPP_3_NAME}
- SERVER_IP=${WEBAPP_3_IP}
haproxy:
container_name: ha
build:
context: ./ha
dockerfile: Dockerfile
ports:
- 80:80
- 1936:1936
- 9999:9999
expose:
- 80
- 1936
- 9999
networks:
heig:
ipv4_address: ${HA_PROXY_IP}
environment:
- WEBAPP_1_IP=${WEBAPP_1_IP}
- WEBAPP_2_IP=${WEBAPP_2_IP}
networks:
heig:
name: heig
driver: bridge
ipam:
driver: default
config:
- subnet: ${NETWORK_SUBNET}