forked from palark/ovpn-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
64 lines (63 loc) · 1.64 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
52
53
54
55
56
57
58
59
60
61
62
63
64
version: '3'
services:
openvpn:
build:
context: .
dockerfile: Dockerfile.openvpn
image: openvpn:local
command: /etc/openvpn/setup/configure.sh
environment:
OVPN_SERVER_NET: ${OVPN_SERVER_NET}
OVPN_SERVER_MASK: ${OVPN_SERVER_MASK}
OVPN_PASSWD_AUTH: "false"
cap_add:
- NET_ADMIN
ports:
- ${OVPN_PORT}:1194/${OVPN_PROTOCOL}
volumes:
- ./easyrsa_master:/etc/openvpn/easyrsa
- ./ccd_master:/etc/openvpn/ccd
- ./ovpn_config:/etc/openvpn/config
networks:
ovpn-net:
ipv4_address: ${OVPN_SERVER_IP}
ovpn-admin:
build:
context: .
image: ovpn-admin:local
command: /app/ovpn-admin
environment:
OVPN_DEBUG: "true"
OVPN_VERBOSE: "true"
OVPN_NETWORK: ${OVPN_ADMIN_OVPN_NETWORK}
OVPN_CCD: "true"
OVPN_CCD_PATH: "/mnt/ccd"
EASYRSA_PATH: "/mnt/easyrsa"
OVPN_SERVER: ${OVPN_PUBLIC_IP}:${OVPN_PORT}:${OVPN_PROTOCOL}
OVPN_INDEX_PATH: "/mnt/easyrsa/pki/index.txt"
OVPN_AUTH: "false"
OVPN_AUTH_DB_PATH: "/mnt/easyrsa/pki/users.db"
LOG_LEVEL: "warn"
networks:
ovpn-net:
ipv4_address: ${OVPN_ADMIN_IP}
volumes:
- ./easyrsa_master:/mnt/easyrsa
- ./ccd_master:/mnt/ccd
ovpn-nginx:
image: nginx:latest
container_name: nginx
networks:
ovpn-net:
ipv4_address: ${OVPN_NGINX_IP}
ports:
- ${OVPN_NGINX_PORT}:8088
volumes:
- ./nginx/.htpasswd:/etc/nginx/.htpasswd:ro
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
networks:
ovpn-net:
ipam:
driver: default
config:
- subnet: ${OVPN_NET_SUBNET}