Commit 05e05146 authored by mehdi's avatar mehdi

now starts on cloudron, by making custom tun device and adding permission

parent ec3ac93b
......@@ -21,6 +21,9 @@
"oauth": {},
"localstorage": {}
},
"permissions": [
"net_admin"
],
"memoryLimit": 536870912,
"tcpPorts": {
"VPN_TCP_PORT": {
......
......@@ -3,15 +3,15 @@ MAINTAINER Mehdi Kouhen <arantes555@gmail.com>
ENV PATH /usr/local/node-6.9.5/bin:$PATH
## Installing openVPN and key-management tool
RUN apt-get update -y
RUN apt-get install -y openvpn easy-rsa
RUN mkdir -p /app/code
WORKDIR /app/code
RUN make-cadir /app/code/easyrsa
## Installing web-admin interface & packaging scripts
ADD package.json /app/code/
RUN npm install --production
......@@ -23,6 +23,9 @@ ADD openvpn/writeOpenVPNConfig.js /app/code/
RUN mkdir -p /app/data
## Setting up TUN device
RUN mknod /app/code/net-tun c 10 200
## Supervisor
ADD supervisor/ /etc/supervisor/conf.d/
RUN sed -e 's,^logfile=.*$,logfile=/run/supervisord.log,' -i /etc/supervisor/supervisord.conf
......
......@@ -9,6 +9,7 @@ mode server
proto tcp
port ${VPN_TCP_PORT}
dev tun
dev-node /app/code/net-tun
# Keys and certificats
ca ${baseDir}ca.crt
cert ${baseDir}cloudron.crt
......
......@@ -37,12 +37,6 @@ if [ ! -d /app/data/keys ]; then
/app/code/easyrsa/pkitool --server cloudron
fi
# Initialize tun device
mkdir -p /dev/net
if [ ! -c /dev/net/tun ]; then
mknod /dev/net/tun c 10 200
fi
node writeOpenVPNConfig.js > /run/openvpn.conf
chown -R cloudron:cloudron /app/data /tmp /run
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment