forked from palark/ovpn-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
51 lines (50 loc) · 1.46 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
version: '3'
services:
openvpn:
image: registry.cn-beijing.aliyuncs.com/partnersun/openvpn:v2.0
command: /etc/openvpn/setup/configure.sh
restart: always
environment:
OVPN_SERVER_NET: "10.15.0.0"
OVPN_SERVER_MASK: "255.255.0.0"
OVPN_DockerBr_NET: "172.20.0.0"
OVPN_DockerBr_MASK: "255.255.0.0"
OVPN_PASSWD_AUTH: "true"
cap_add:
- NET_ADMIN
ports:
- 20194:1194/udp # for openvpn
- 8080:8080 # for ovpn-admin because of network_mode
volumes:
- /data/openvpn/easyrsa_master:/etc/openvpn/easyrsa
- /data/openvpn/ccd_master:/etc/openvpn/ccd
- /var/log/openvpn:/var/log/openvpn
networks:
network1:
ipv4_address: 172.20.0.5
ovpn-admin:
image: registry.cn-beijing.aliyuncs.com/partnersun/openvpn:admin-latest
command: /app/ovpn-admin
restart: always
environment:
OVPN_DEBUG: "true"
OVPN_VERBOSE: "true"
OVPN_NETWORK: "10.15.0.0./16"
OVPN_CCD: "true"
OVPN_CCD_PATH: "/mnt/ccd"
EASYRSA_PATH: "/mnt/easyrsa"
OVPN_SERVER: "public-ip:20194:udp"
OVPN_INDEX_PATH: "/mnt/easyrsa/pki/index.txt"
OVPN_AUTH: "true"
OVPN_AUTH_DB_PATH: "/mnt/easyrsa/pki/users.db"
LOG_LEVEL: "debug"
network_mode: service:openvpn
depends_on:
- openvpn
volumes:
- /data/openvpn/easyrsa_master:/mnt/easyrsa
- /data/openvpn/ccd_master:/mnt/ccd
networks:
network1:
name: br-wg
external: true