Skip to content

Commit

Permalink
Fixed volumen problem
Browse files Browse the repository at this point in the history
Remove some console logs 
Hardcoded the ENV vars
  • Loading branch information
eduadiez committed Jun 3, 2018
1 parent ae9df0e commit ae571ac
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
2 changes: 2 additions & 0 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ ENV VPN_IP_FILE_PATH /usr/src/app/secrets/server-ip
ENV VPN_PSK_FILE_PATH /usr/src/app/secrets/server-psk
ENV VPN_NAME_FILE_PATH /usr/src/app/secrets/vpnname
ENV VPN_ADMIN_PASS_FILE_PATH /usr/src/app/secrets/admin-pass
ENV VPN_DNS_SRV1 172.33.1.2
ENV VPN_DNS_SRV2 8.8.8.8

# location of the OTP parsing tool
ENV DAPPNODE_OTP_URL https://dappnode.github.io/DAppNode_OTP/
Expand Down
4 changes: 2 additions & 2 deletions build/src/getAdminCredentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ start()

async function start () {

console.log('Waiting for credentials files to exist')
//console.log('Waiting for credentials files to exist')
await fetchVPNparameters()
console.log('VPN credentials fetched, VPN_IP: ' + VPN_IP + ' VPN_PSK: ' + VPN_PSK)
//console.log('VPN credentials fetched, VPN_IP: ' + VPN_IP + ' VPN_PSK: ' + VPN_PSK)

logAdminCredentials(VPN_IP, VPN_PSK)

Expand Down
21 changes: 11 additions & 10 deletions dappnode_package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
{
"name": "vpn.dnp.dappnode.eth",
"version": "0.1.0",
"version": "0.1.1",
"description": "Dappnode package responsible for providing the VPN (L2TP/IPSec) connection",
"avatar": "/ipfs/QmWwMb3XhuCH6JnCF6m6EQzA4mW9pHHtg7rqAfhDr2ofi8",
"type": "dncore",
"image": {
"path": "vpn.dnp.dappnode.eth_0.1.0.tar.xz",
"hash": "/ipfs/QmXvWFs6Re4Bp42gYa4whQE9yKSJbi3g9PETaTUnypQKm5",
"size": 31516488,
"path": "vpn.dnp.dappnode.eth_0.1.1.tar.xz",
"hash": "/ipfs/QmVDxpEtRYyhhf5uKdgJrqT7vNNRp3W8wZBHsWLnoKr34h",
"size": 31504548,
"volumes": [
"/etc/hostname:/etc/vpnname:ro",
"/lib/modules:/lib/modules:ro"
"/lib/modules:/lib/modules:ro",
"vpndnpdappnodeeth_data:/usr/src/app/secrets"
],
"ports": [
"4500:4500/udp",
"500:500/udp"
],
"environment": [
"VPN_DNS_SRV1=172.33.1.2",
"VPN_DNS_SRV2=8.8.8.8"
],
"privileged": "true",
"restart": "always",
"subnet": "172.33.0.0/16",
Expand All @@ -36,7 +33,11 @@
"IPSec",
"L2TP"
],
"homepage": "https://github.com/dappnode/DNP_VPN#readme",
"homepage": {
"adminui": "http://my.vpn.dnp.dappnode.eth",
"userui": "http://my.vpn.dnp.dappnode.eth",
"homepage": "https://github.com/dappnode/DNP_BIND#readme"
},
"repository": {
"type": "git",
"url": "https://github.com/dappnode/DNP_VPN"
Expand Down
9 changes: 5 additions & 4 deletions docker-compose-vpn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ networks:
config:
- subnet: 172.33.0.0/16

volumes:
vpndnpdappnodeeth_data: {}

services:
vpn.dnp.dappnode.eth:
build: ./build
image: vpn.dnp.dappnode.eth:0.1.0
image: vpn.dnp.dappnode.eth:0.1.1
container_name: DAppNodeCore-vpn.dnp.dappnode.eth
privileged: true
restart: always
volumes:
- /etc/hostname:/etc/vpnname:ro
- /lib/modules:/lib/modules:ro
- vpndnpdappnodeeth_data:/usr/src/app/secrets
ports:
- 4500:4500/udp
- 500:500/udp
environment:
- VPN_DNS_SRV1=172.33.1.2
- VPN_DNS_SRV2=8.8.8.8
dns: 172.33.1.2
networks:
network:
Expand Down

0 comments on commit ae571ac

Please sign in to comment.