forked from palark/ovpn-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml.example
62 lines (60 loc) · 1.6 KB
/
docker-compose.yaml.example
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
services:
openvpn:
build:
context: .
dockerfile: Dockerfile.openvpn
image: openvpn:local
restart: always
privileged: true
command: /etc/openvpn/setup/configure.sh
environment:
OVPN_SERVER_NET: "10.8.0.0"
OVPN_SERVER_MASK: "255.255.255.0"
OVPN_SERVER_PORT: "YOUR_OPENVPN_SERVER_PORT"
OVPN_PASSWD_AUTH: "false"
cap_add:
- NET_ADMIN
ports:
- "YOUR_OPENVPN_SERVER_PORT:YOUR_OPENVPN_SERVER_PORT"
volumes:
- ./easyrsa_master:/etc/openvpn/easyrsa
- ./ccd_master:/etc/openvpn/ccd
ovpn-admin:
build:
context: .
dockerfile: Dockerfile.ovpn-admin
image: ovpn-admin:local
restart: always
command: /app/ovpn-admin
privileged: true
environment:
OVPN_DEBUG: "false"
OVPN_VERBOSE: "true"
OVPN_NETWORK: "10.8.0.0/24"
OVPN_CCD: "true"
OVPN_CCD_PATH: "/mnt/ccd"
EASYRSA_PATH: "/mnt/easyrsa"
OVPN_SERVER: "YOUR_OPENVPN_SERVER_IP:YOUR_OPENVPN_SERVER_PORT:tcp"
OVPN_INDEX_PATH: "/mnt/easyrsa/pki/index.txt"
OVPN_AUTH: "false"
OVPN_AUTH_DB_PATH: "/mnt/easyrsa/pki/users.db"
LOG_LEVEL: "debug"
network_mode: service:openvpn
volumes:
- ./easyrsa_master:/mnt/easyrsa
- ./ccd_master:/mnt/ccd
depends_on:
- openvpn
nginx-auth:
image: beevelop/nginx-basic-auth
restart: always
environment:
HTPASSWD: "YOUR_OVPN_ADMIN_USER:YOUR_OVPN_ADMIN_PASSWORD_HASH"
FORWARD_HOST: "openvpn"
FORWARD_PORT: "8080"
ports:
- "YOUR_OVPN_ADMIN_PORT:80"
profiles:
- auth
depends_on:
- ovpn-admin