diff --git a/docker/Dockerfile b/docker/Dockerfile index fd6efd76..eb44f7b3 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,8 +15,7 @@ RUN adduser --quiet meshcentral \ && chmod +x /startmeshcentral.sh \ && su - meshcentral \ && cd /home/meshcentral \ - && npm install meshcentral node-7z greenlock-cli \ - && ls + && npm install meshcentral node-7z greenlock-cli ENV PORT 443 ENV REDIRPORT 80 diff --git a/docker/startmeshcentral.sh b/docker/startmeshcentral.sh index f12923a9..4f7b429d 100644 --- a/docker/startmeshcentral.sh +++ b/docker/startmeshcentral.sh @@ -15,7 +15,7 @@ cd /home/meshcentral/ npm install meshcentral if ! [ -f node_modules/.meshcentral-data/agentserver-cert-private.key ] ;then - forever start node_modules/meshcentral/meshcentral.js --cert $HOSTNAME + node node_modules/meshcentral/meshcentral.js --cert $HOSTNAME --port $PORT --redirport $REDIRPORT elif [ -f ssl.key ]; then ln -sf ssl.key node_modules/.meshcentral-data/agentserver-cert-private.key ln -sf ssl.cert node_modules/.meshcentral-data/agentserver-cert-public.crt @@ -25,7 +25,8 @@ elif [ -f ssl.key ]; then ln -sf ssl.cert node_modules/.meshcentral-data/webserver-cert-public.crt ln -sf ssl.key node_modules/.meshcentral-data/mpsserver-cert-private.key ln -sf ssl.cert node_modules/.meshcentral-data/mpsserver-cert-public.crt + node node_modules/meshcentral/meshcentral.js --port $PORT --redirport $REDIRPORT else - forever start node_modules/meshcentral/meshcentral.js --port $PORT --redirport $REDIRPORT + node node_modules/meshcentral/meshcentral.js --port $PORT --redirport $REDIRPORT fi \ No newline at end of file diff --git a/startmeshcentral.sh b/startmeshcentral.sh index ef173c6f..b9580c32 100644 --- a/startmeshcentral.sh +++ b/startmeshcentral.sh @@ -11,6 +11,7 @@ else REDIRPORT=$2 fi + su - meshcentral cd /home/meshcentral/ npm install meshcentral