forked from palark/ovpn-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-slave.yaml
30 lines (29 loc) · 962 Bytes
/
docker-compose-slave.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
version: '3'
services:
openvpn:
build:
context: .
dockerfile: Dockerfile.openvpn
image: openvpn:local
command: /etc/openvpn/setup/configure.sh
environment:
- OVPN_ROLE=slave
cap_add:
- NET_ADMIN
ports:
- 7778:1194 # for openvpn
- 8081:8080 # for ovpn-admin because of network_mode
volumes:
- ./easyrsa_slave:/etc/openvpn/easyrsa
- ./ccd_slave:/etc/openvpn/ccd
ovpn-admin:
build:
context: .
image: ovpn-admin:local
command: /app/ovpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --master.host="http://172.20.0.1:8080" --role="slave" --ovpn.server="127.0.0.1:7777:tcp" --ovpn.server="127.0.0.1:7778:tcp" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt"
environment:
- OVPN_SLAVE=1
network_mode: service:openvpn
volumes:
- ./easyrsa_slave:/mnt/easyrsa
- ./ccd_slave:/mnt/ccd