-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
62 lines (57 loc) · 1.45 KB
/
docker-compose.yaml
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
version: "3.9"
services:
haproxy:
build:
context: "./haproxy/"
args:
HA_VERSION: ${HA_VERSION}
environment:
- TZ=Asia/Taipei
depends_on:
- nginx
links:
- nginx
ports:
- "80:80"
- "443:443"
volumes:
- haproxy-config:/usr/local/etc/haproxy/
- ${CERT_PATH}:/etc/haproxy/certs/
- ${CERT_PATH}/challenge:/usr/share/nginx/html/
container_name: "${HA_NAME}"
restart: always
nginx:
build:
context: "./nginx/"
args:
NGINX_VERSION: ${NGINX_VERSION}
environment:
- TZ=Asia/Taipei
- NGINX_PORT=${NGINX_PORT}
expose:
- "58588"
volumes:
- nginx-config:/etc/nginx/templates/
- ${CERT_PATH}:/etc/haproxy/certs/
- ${CERT_PATH}/challenge:/usr/share/nginx/html/
container_name: "${NGINX_NAME}"
restart: always
volumes:
haproxy-config:
driver: local
driver_opts:
type: "none"
o: "bind"
device: "./config/haproxy/"
external: false
nginx-config:
driver: local
driver_opts:
type: "none"
o: "bind"
device: "./config/nginx/"
external: false
networks:
default:
name: ${NET_WORK}
external: true