mirror of
https://github.com/WGDashboard/WGDashboard.git
synced 2026-12-01 17:07:47 +00:00
Compare commits
7
Commits
4d08059e5e
...
8f0c37f716
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f0c37f716 | ||
|
|
42fcbb5a6e | ||
|
|
017e375f90 | ||
|
|
3bd56d5593 | ||
|
|
e27dd986bc | ||
|
|
e6448f2ffd | ||
|
|
e2b5a59291 |
+8
-3
@@ -1,9 +1,14 @@
|
||||
.git
|
||||
.github
|
||||
*.md
|
||||
tests/
|
||||
docs/
|
||||
|
||||
*.md
|
||||
|
||||
**/node_modules
|
||||
**/venv
|
||||
**/__pycache__
|
||||
**/*.pyc
|
||||
|
||||
src/db
|
||||
src/wg-dashboard.ini
|
||||
src/static/app
|
||||
src/static/client
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
FROM golang:1.24 AS awg-go
|
||||
|
||||
RUN git clone https://github.com/WGDashboard/amneziawg-go /awg
|
||||
WORKDIR /awg
|
||||
RUN go mod download && \
|
||||
go mod verify && \
|
||||
go build -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin
|
||||
|
||||
FROM alpine:latest AS awg-tools
|
||||
|
||||
RUN apk update && apk add --no-cache \
|
||||
make git build-base linux-headers \
|
||||
&& git clone https://github.com/WGDashboard/amneziawg-tools \
|
||||
&& cd amneziawg-tools/src \
|
||||
&& make \
|
||||
&& chmod +x wg*
|
||||
|
||||
FROM alpine:latest
|
||||
LABEL maintainer="[email protected]"
|
||||
|
||||
RUN apk update && apk add --no-cache \
|
||||
iproute2 iptables bash curl wget unzip procps sudo \
|
||||
tzdata wireguard-tools python3 py3-psutil py3-bcrypt openresolv
|
||||
|
||||
COPY --from=awg-go /usr/bin/amneziawg-go /usr/bin/amneziawg-go
|
||||
COPY --from=awg-tools /amneziawg-tools/src/wg /usr/bin/awg
|
||||
COPY --from=awg-tools /amneziawg-tools/src/wg-quick/linux.bash /usr/bin/awg-quick
|
||||
|
||||
# Declaring environment variables, change Peernet to an address you like, standard is a 24 bit subnet.
|
||||
ARG wg_net="10.0.0.1" \
|
||||
wg_port="51820"
|
||||
|
||||
# Following ENV variables are changable on container runtime because /entrypoint.sh handles that. See compose.yaml for more info.
|
||||
ENV TZ="Europe/Amsterdam" \
|
||||
global_dns="9.9.9.9" \
|
||||
wgd_port="10086" \
|
||||
public_ip=""
|
||||
|
||||
# Using WGDASH -- like wg_net functionally as a ARG command. But it is needed in entrypoint.sh so it needs to be exported as environment variable.
|
||||
ENV WGDASH=/opt/wgdashboard
|
||||
|
||||
# Doing WireGuard Dashboard installation measures. Modify the git clone command to get the preferred version, with a specific branch for example.
|
||||
RUN mkdir /data \
|
||||
&& mkdir /configs \
|
||||
&& mkdir -p ${WGDASH}/src \
|
||||
&& mkdir -p /etc/amnezia/amneziawg
|
||||
COPY ./src ${WGDASH}/src
|
||||
|
||||
# Generate basic WireGuard interface. Echoing the WireGuard interface config for readability, adjust if you want it for efficiency.
|
||||
# Also setting the pipefail option, verbose: https://github.com/hadolint/hadolint/wiki/DL4006.
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
RUN out_adapt=$(ip -o -4 route show to default | awk '{print $NF}') \
|
||||
&& echo -e "[Interface]\n\
|
||||
Address = ${wg_net}/24\n\
|
||||
PrivateKey =\n\
|
||||
PostUp = iptables -t nat -I POSTROUTING 1 -s ${wg_net}/24 -o ${out_adapt} -j MASQUERADE\n\
|
||||
PostUp = iptables -I FORWARD -i wg0 -o wg0 -j DROP\n\
|
||||
PreDown = iptables -t nat -D POSTROUTING -s ${wg_net}/24 -o ${out_adapt} -j MASQUERADE\n\
|
||||
PreDown = iptables -D FORWARD -i wg0 -o wg0 -j DROP\n\
|
||||
ListenPort = ${wg_port}\n\
|
||||
SaveConfig = true\n\
|
||||
DNS = ${global_dns}" > /configs/wg0.conf.template \
|
||||
&& chmod 600 /configs/wg0.conf.template
|
||||
|
||||
# Defining a way for Docker to check the health of the container. In this case: checking the gunicorn process.
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
||||
CMD sh -c 'pgrep gunicorn > /dev/null && pgrep tail > /dev/null' || exit 1
|
||||
|
||||
# Copy the basic entrypoint.sh script.
|
||||
COPY ./docker/entrypoint.sh /entrypoint.sh
|
||||
|
||||
# Exposing the default WireGuard Dashboard port for web access.
|
||||
EXPOSE 10086
|
||||
WORKDIR $WGDASH
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||||
+38
-5
@@ -4,7 +4,7 @@
|
||||
#
|
||||
|
||||
# Pull the current golang-alpine image.
|
||||
FROM golang:1.26-alpine3.23 AS awg-go
|
||||
FROM golang:1.27-alpine3.24 AS awg-go
|
||||
|
||||
# Install build-dependencies.
|
||||
RUN apk add --no-cache \
|
||||
@@ -55,7 +55,7 @@ RUN make && chmod +x wg*
|
||||
#
|
||||
|
||||
# Use the python-alpine image for building pip dependencies
|
||||
FROM python:3.14-alpine3.23 AS pip-builder
|
||||
FROM python:3.15-alpine3.24 AS pip-builder
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
@@ -85,13 +85,32 @@ RUN . /opt/wgdashboard/src/venv/bin/activate && \
|
||||
pip3 install --upgrade pip && \
|
||||
pip3 install -r /opt/wgdashboard/src/requirements.txt
|
||||
|
||||
#
|
||||
# WGDashboard FRONTEND BUILDING
|
||||
# Base: Node Alpine
|
||||
#
|
||||
FROM node:26-alpine3.24 AS frontend-builder
|
||||
|
||||
WORKDIR /workspace
|
||||
|
||||
# Copy frontend source, package files and lockfiles
|
||||
COPY ./src/static/ ./
|
||||
|
||||
# Build the admin frontend
|
||||
WORKDIR /workspace/app
|
||||
RUN npm ci && npm run build
|
||||
|
||||
# Build the client frontend
|
||||
WORKDIR /workspace/client
|
||||
RUN npm ci && npm run build
|
||||
|
||||
#
|
||||
# WGDashboard RUNNING STAGE
|
||||
# Base: Alpine
|
||||
#
|
||||
|
||||
# Running with the python-alpine image.
|
||||
FROM python:3.14-alpine3.23 AS final
|
||||
FROM python:3.15-alpine3.24 AS final
|
||||
LABEL maintainer="[email protected]"
|
||||
|
||||
# Install only the runtime dependencies
|
||||
@@ -121,11 +140,25 @@ ENV TZ="Europe/Amsterdam" \
|
||||
RUN mkdir /data /configs -p ${WGDASH}/src /etc/amnezia/amneziawg \
|
||||
&& echo "name_servers=${global_dns}" >> /etc/resolvconf.conf
|
||||
|
||||
# Copy the venv and source files from local compiled locations or repos
|
||||
# Copy application source
|
||||
COPY ./src ${WGDASH}/src
|
||||
COPY --from=pip-builder /opt/wgdashboard/src/venv /opt/wgdashboard/src/venv
|
||||
|
||||
# Copy Python dependencies
|
||||
COPY --from=pip-builder \
|
||||
/opt/wgdashboard/src/venv \
|
||||
${WGDASH}/src/venv
|
||||
|
||||
RUN rm -rf ${WGDASH}/src/static/dist \
|
||||
${WGDASH}/src/static/app \
|
||||
${WGDASH}/src/static/client
|
||||
|
||||
COPY --from=frontend-builder \
|
||||
/workspace/dist/ \
|
||||
${WGDASH}/src/static/dist/
|
||||
|
||||
COPY ./docker/wg0.conf.template /tmp/wg0.conf.template
|
||||
COPY ./docker/wg-dashboard-oidc-providers.json.template /tmp/wg-dashboard-oidc-providers.json.template
|
||||
|
||||
# Copy in the runtime script, essential.
|
||||
COPY ./docker/entrypoint.sh /entrypoint.sh
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ pyotp==2.10.0
|
||||
Flask==3.1.2
|
||||
flask-cors==6.0.5
|
||||
icmplib==3.0.4
|
||||
gunicorn==26.0.0
|
||||
gunicorn==26.2.0
|
||||
requests==2.34.2
|
||||
tcconfig==0.30.1
|
||||
sqlalchemy==2.0.51
|
||||
sqlalchemy_utils==0.42.1
|
||||
psycopg[binary]==3.3.4
|
||||
sqlalchemy==2.1.6
|
||||
sqlalchemy_utils==0.43.0
|
||||
psycopg[binary]==3.3.6
|
||||
PyMySQL==1.2.0
|
||||
tzlocal==5.3.1
|
||||
tzlocal==5.4.5
|
||||
python-jose==3.5.0
|
||||
pydantic==2.13.4
|
||||
pydantic==2.14.1
|
||||
|
||||
Generated
+393
-311
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@
|
||||
"@volar/language-server": "2.4.28",
|
||||
"@vue/language-server": "3.2.7",
|
||||
"@vuepic/vue-datepicker": "^14.0.0",
|
||||
"@vueuse/core": "^14.2.1",
|
||||
"@vueuse/core": "^15.0.0",
|
||||
"@vueuse/shared": "^14.3.0",
|
||||
"animate.css": "^4.1.1",
|
||||
"bootstrap": "^5.3.2",
|
||||
@@ -24,9 +24,9 @@
|
||||
"css-color-converter": "^2.0.0",
|
||||
"dayjs": "^1.11.19",
|
||||
"electron-builder": "^26.7.0",
|
||||
"fuse.js": "^7.3.0",
|
||||
"fuse.js": "^7.5.0",
|
||||
"i": "^0.3.7",
|
||||
"is-cidr": "^6.0.3",
|
||||
"is-cidr": "^7.0.3",
|
||||
"npm": "^11.13.0",
|
||||
"ol": "^10.9.0",
|
||||
"pinia": "^3.0.4",
|
||||
@@ -37,10 +37,10 @@
|
||||
"uuid": "^14.0.0",
|
||||
"vue": "^3.5.32",
|
||||
"vue-chartjs": "^5.3.3",
|
||||
"vue-router": "^5.0.6"
|
||||
"vue-router": "^5.4.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^6.0.6",
|
||||
"@vitejs/plugin-vue": "^6.0.10",
|
||||
"vite": "^8.0.16"
|
||||
},
|
||||
"overrides": {
|
||||
|
||||
Generated
+285
-332
File diff suppressed because it is too large
Load Diff
@@ -16,13 +16,13 @@
|
||||
"oidc-client-ts": "^3.5.0",
|
||||
"pinia": "^3.0.4",
|
||||
"qrcode": "^1.5.4",
|
||||
"uuid": "^14.0.0",
|
||||
"vue": "^3.5.35",
|
||||
"uuid": "^14.0.3",
|
||||
"vue": "^3.5.44",
|
||||
"vue-router": "^5.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^6.0.6",
|
||||
"vite": "^8.0.16",
|
||||
"vite-plugin-vue-devtools": "^8.1.2"
|
||||
"@vitejs/plugin-vue": "^6.0.10",
|
||||
"vite": "^8.3.5",
|
||||
"vite-plugin-vue-devtools": "^8.2.1"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user