-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
86 lines (79 loc) · 1.6 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
---
version: '3.8'
services:
forti:
image: forti:compose
build: ./forti
environment:
- TZ=Asia/Shanghai
cap_add:
- NET_ADMIN
secrets:
- source: forti
target: config
uid: '1000'
gid: '1000'
mode: 0400
sysctls:
- net.ipv4.ip_forward=1
devices:
- "/dev/ppp:/dev/ppp"
volumes:
- ${PWD}/resolv.conf:/etc/resolv.conf:rw
networks:
forti:
ipv4_address: 172.22.0.2
command: ["openfortivpn", "-c", "/run/secrets/config"]
tunnel_to:
image: tunnel_to:compose
build: ./tunnel_to
environment:
- TZ=Asia/Shanghai
cap_add:
- NET_ADMIN
configs:
- source: tunnel_to_config
target: /app/glider.conf
uid: '1000'
gid: '1000'
mode: 0440
ports:
- 1080:8443
depends_on:
- forti
volumes:
- ${PWD}/resolv.conf:/etc/resolv.conf:rw
networks:
forti:
ipv4_address: 172.22.0.3
tunnel_back:
image: tunnel_back:compose
build: ./tunnel_back
environment:
- TZ=Asia/Shanghai
configs:
- source: tunnel_back_config
target: /app/glider.conf
uid: '1000'
gid: '1000'
mode: 0440
depends_on:
- forti
networks:
forti:
ipv4_address: 172.22.0.4
configs:
tunnel_to_config:
file: ./tunnel_to/glider.conf
tunnel_back_config:
file: ./tunnel_back/glider.conf
secrets:
forti:
file: ./config
networks:
forti:
name: "internal-network-for-vpn-stack"
driver: bridge
ipam:
config:
- subnet: 172.22.0.0/24