diff --git a/Dockerfile b/Dockerfile index 6cc92a60..9ceaa8eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,8 @@ FROM docker.io/library/node:18-alpine AS build_node_modules RUN npm install -g npm@latest # Copy Web UI -COPY src /app +COPY src/ /app/ +COPY webui/dist/ /app/www/ WORKDIR /app RUN npm ci --omit=dev &&\ mv node_modules /node_modules @@ -44,5 +45,5 @@ RUN update-alternatives --install /sbin/iptables iptables /sbin/iptables-legacy ENV DEBUG=Server,WireGuard # Run Web UI -WORKDIR /app/server +WORKDIR /app CMD ["/usr/bin/dumb-init", "node", "server.js"] diff --git a/src/.env b/src/.env deleted file mode 100644 index 122fe628..00000000 --- a/src/.env +++ /dev/null @@ -1,3 +0,0 @@ -WG_HOST=127.0.0.1 -UI_TRAFFIC_STATS=true -UI_CHART_TYPE=2 \ No newline at end of file diff --git a/src/config.js b/src/config.js index 40b70ddf..d058ad7d 100644 --- a/src/config.js +++ b/src/config.js @@ -1,6 +1,7 @@ 'use strict'; const { release } = require('./package.json'); +require('dotenv').config(); module.exports.RELEASE = release; module.exports.PORT = process.env.PORT || '51821';