-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (42 loc) · 1.09 KB
/
docker-compose.yml
File metadata and controls
43 lines (42 loc) · 1.09 KB
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
version: '3'
services:
nginx_web_1:
container_name: ${LB_PROJECT_NAME}_NGINX_con_1
build: ./nginx/web1
expose:
- ${NGINX_EXPOSED_PORT}
networks:
public_net:
ipv4_address: ${NGINX_1_IP}
aliases:
- nginx1
nginx_web_2:
container_name: ${LB_PROJECT_NAME}_NGINX_con_2
build: ./nginx/web2
expose:
- ${NGINX_EXPOSED_PORT}
networks:
public_net:
ipv4_address: ${NGINX_2_IP}
aliases:
- nginx2
haproxy:
build: ./haproxy
ports:
- 80:80
expose:
- 80
networks:
public_net:
ipv4_address: ${HA_PROXY_IP}
environment:
- NGINX_1_IP=${NGINX_1_IP}
- NGINX_2_IP=${NGINX_2_IP}
- NGINX_EXPOSED_PORT=${NGINX_EXPOSED_PORT}
networks:
public_net:
driver: bridge
ipam:
driver: default
config:
- subnet: ${NETWORK_SUBNET}