-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml.dist
92 lines (88 loc) · 2.44 KB
/
docker-compose.yml.dist
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
version: '2'
services:
app:
privileged: true
cap_add:
- NET_ADMIN
ports:
- "1194:1194"
environment:
# Web-application parameters
- APP_PATH=/var/www/html
- SCRIPTS_PATH=/var/www/html/scripts/auth-bash
- SCRIPTS_LOGIN=/var/www/html/scripts/auth-bash/login.sh
- SCRIPTS_CONNECT=/var/www/html/scripts/auth-bash/connect.sh
- SCRIPTS_DISCONNECT=/var/www/html/scripts/auth-bash/disconnect.sh
# Database parameters
- DB_HOST=mysql
- DB_PORT=3306
- DB_NAME=openvpn-admin
- DB_USER=openvpn
- DB_PASS=openvpn_pass
# OpenVPN settings
- VPN_CONF=/etc/openvpn
- VPN_DEV=tun0
- VPN_LOCAL=
- VPN_LOCAL_PORT=1194
- VPN_REMOTE=172.10.12.15
- VPN_REMOTE_PORT=443
- VPN_USER=nobody
- VPN_GROUP=nogroup
- VPN_PROTO=tcp
- VPN_IF=eth0
# TODO: Rewrite this part to ipcalc
- VPN_SERVER="10.8.0.0 255.255.255.0"
- VPN_NET=10.8.0.0/24
# OpenVPN key parameters
- EASYRSA_KEY_SIZE=2048
- EASYRSA_CA_EXPIRE=3650
- EASYRSA_CERT_EXPIRE=3650
- EASYRSA_REQ_COUNTRY="US"
- EASYRSA_REQ_PROVINCE="California"
- EASYRSA_REQ_CITY="San Francisco"
- EASYRSA_REQ_ORG="Copyleft Certificate Co"
- EASYRSA_REQ_OU="My Organizational Unit"
- EASYRSA_REQ_CN=ChangeMe
- EASYRSA_BATCH=true
build:
context: configs
args:
DEB_PHP: nginx php php-fpm php-mbstring php-mysql php-zip php-curl
DEB_OPENVPN: openvpn openvpn-auth-ldap openvpn-auth-radius mysql-client
DEB_OTHER: sed curl wget unzip iproute2 iptables
volumes:
- ./app:/var/www/html
- ./openvpn:/etc/openvpn
- ./logs/openvpn:/var/log/openvpn
links:
- "mysql:db"
nginx:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./configs/nginx.conf:/etc/nginx/conf.d/default.conf:delegated
- ./app:/var/www/html:delegated
- ./logs/nginx:/var/log/nginx
links:
- "app"
mysql:
image: mysql:5.6
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=openvpn-admin
- MYSQL_ROOT_PASSWORD=rootrootroot
- MYSQL_USER=openvpn
- MYSQL_PASSWORD=openvpn_pass
volumes:
- ./database:/var/lib/mysql
- ./logs/mysql:/var/log/mysql
phpmyadmin:
image: phpmyadmin/phpmyadmin
ports:
- "8080:80"
links:
- "app"
- "mysql:db"