2020-11-17 19:48:26 +02:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
openvpn:
|
|
|
|
build:
|
|
|
|
context: .
|
|
|
|
dockerfile: Dockerfile.openvpn
|
|
|
|
image: openvpn:local
|
|
|
|
command: /etc/openvpn/setup/configure.sh
|
|
|
|
environment:
|
2021-03-17 12:44:12 +02:00
|
|
|
- OVPN_ROLE=slave
|
2020-11-17 19:48:26 +02:00
|
|
|
cap_add:
|
|
|
|
- NET_ADMIN
|
|
|
|
ports:
|
|
|
|
- 7778:1194 # for openvpn
|
2021-03-17 11:05:37 +02:00
|
|
|
- 8081:8080 # for ovpn-admin because of network_mode
|
2020-11-17 19:48:26 +02:00
|
|
|
volumes:
|
|
|
|
- ./easyrsa_slave:/etc/openvpn/easyrsa
|
|
|
|
- ./ccd_slave:/etc/openvpn/ccd
|
2021-03-17 11:05:37 +02:00
|
|
|
ovpn-admin:
|
2020-11-17 19:48:26 +02:00
|
|
|
build:
|
|
|
|
context: .
|
2021-03-17 11:05:37 +02:00
|
|
|
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"
|
2020-11-17 19:48:26 +02:00
|
|
|
environment:
|
2021-03-17 12:44:12 +02:00
|
|
|
- OVPN_SLAVE=1
|
2020-11-17 19:48:26 +02:00
|
|
|
network_mode: service:openvpn
|
|
|
|
volumes:
|
|
|
|
- ./easyrsa_slave:/mnt/easyrsa
|
|
|
|
- ./ccd_slave:/mnt/ccd
|