mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2026-10-30 01:12:07 +00:00
* build(deps): bump golang in /docker Bumps golang from 1.26-alpine3.24 to 1.27-alpine3.24. --- updated-dependencies: - dependency-name: golang dependency-version: 1.27-alpine3.24 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump python in /docker Bumps python from 3.14-alpine3.24 to 3.15-alpine3.24. --- updated-dependencies: - dependency-name: python dependency-version: 3.15-alpine3.23 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump sqlalchemy-utils from 0.42.1 to 0.43.0 in /src Bumps [sqlalchemy-utils](https://github.com/kvesteri/sqlalchemy-utils) from 0.42.1 to 0.43.0. - [Release notes](https://github.com/kvesteri/sqlalchemy-utils/releases) - [Changelog](https://github.com/kvesteri/sqlalchemy-utils/blob/master/CHANGES.rst) - [Commits](https://github.com/kvesteri/sqlalchemy-utils/compare/0.42.1...0.43.0) --- updated-dependencies: - dependency-name: sqlalchemy-utils dependency-version: 0.43.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump bootstrap-icons in /src/static/client Bumps [bootstrap-icons](https://github.com/twbs/icons) from 1.13.1 to 1.13.2. - [Release notes](https://github.com/twbs/icons/releases) - [Commits](https://github.com/twbs/icons/compare/v1.13.1...v1.13.2) --- updated-dependencies: - dependency-name: bootstrap-icons dependency-version: 1.13.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump pinia from 3.0.4 to 4.1.0 in /src/static/client Bumps [pinia](https://github.com/vuejs/pinia) from 3.0.4 to 4.1.0. - [Release notes](https://github.com/vuejs/pinia/releases) - [Commits](https://github.com/vuejs/pinia/compare/v3.0.4...v4.1.0) --- updated-dependencies: - dependency-name: pinia dependency-version: 4.1.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump @vueuse/shared in /src/static/app Bumps [@vueuse/shared](https://github.com/vueuse/vueuse/tree/HEAD/packages/shared) from 14.4.0 to 15.0.0. - [Release notes](https://github.com/vueuse/vueuse/releases) - [Commits](https://github.com/vueuse/vueuse/commits/v15.0.0/packages/shared) --- updated-dependencies: - dependency-name: "@vueuse/shared" dependency-version: 15.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump dayjs from 1.11.19 to 1.11.23 in /src/static/app Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.11.19 to 1.11.23. - [Release notes](https://github.com/iamkun/dayjs/releases) - [Changelog](https://github.com/iamkun/dayjs/blob/v1.11.23/CHANGELOG.md) - [Commits](https://github.com/iamkun/dayjs/compare/v1.11.19...v1.11.23) --- updated-dependencies: - dependency-name: dayjs dependency-version: 1.11.23 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump cidr-tools from 12.0.2 to 13.0.4 in /src/static/app Bumps [cidr-tools](https://github.com/silverwind/cidr-tools) from 12.0.2 to 13.0.4. - [Release notes](https://github.com/silverwind/cidr-tools/releases) - [Commits](https://github.com/silverwind/cidr-tools/compare/12.0.2...13.0.4) --- updated-dependencies: - dependency-name: cidr-tools dependency-version: 13.0.4 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump pymysql from 1.2.0 to 1.2.3 in /src Bumps [pymysql](https://github.com/PyMySQL/PyMySQL) from 1.2.0 to 1.2.3. - [Release notes](https://github.com/PyMySQL/PyMySQL/releases) - [Changelog](https://github.com/PyMySQL/PyMySQL/blob/main/CHANGELOG.md) - [Commits](https://github.com/PyMySQL/PyMySQL/compare/v1.2.0...v1.2.3) --- updated-dependencies: - dependency-name: pymysql dependency-version: 1.2.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump @vue/language-server in /src/static/app Bumps [@vue/language-server](https://github.com/vuejs/language-tools/tree/HEAD/packages/language-server) from 3.2.7 to 3.3.13. - [Release notes](https://github.com/vuejs/language-tools/releases) - [Changelog](https://github.com/vuejs/language-tools/blob/master/CHANGELOG.md) - [Commits](https://github.com/vuejs/language-tools/commits/v3.3.13/packages/language-server) --- updated-dependencies: - dependency-name: "@vue/language-server" dependency-version: 3.3.13 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump dayjs from 1.11.21 to 1.11.23 in /src/static/client Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.11.21 to 1.11.23. - [Release notes](https://github.com/iamkun/dayjs/releases) - [Changelog](https://github.com/iamkun/dayjs/blob/v1.11.23/CHANGELOG.md) - [Commits](https://github.com/iamkun/dayjs/compare/v1.11.21...v1.11.23) --- updated-dependencies: - dependency-name: dayjs dependency-version: 1.11.23 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump @volar/language-server in /src/static/app Bumps [@volar/language-server](https://github.com/volarjs/volar.js/tree/HEAD/packages/language-server) from 2.4.28 to 2.4.30. - [Release notes](https://github.com/volarjs/volar.js/releases) - [Changelog](https://github.com/volarjs/volar.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/volarjs/volar.js/commits/v2.4.30/packages/language-server) --- updated-dependencies: - dependency-name: "@volar/language-server" dependency-version: 2.4.30 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump vue-router from 5.1.0 to 5.4.0 in /src/static/client Bumps [vue-router](https://github.com/vuejs/router) from 5.1.0 to 5.4.0. - [Release notes](https://github.com/vuejs/router/releases) - [Commits](https://github.com/vuejs/router/compare/v5.1.0...v5.4.0) --- updated-dependencies: - dependency-name: vue-router dependency-version: 5.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump axios from 1.18.0 to 1.20.0 in /src/static/client Bumps [axios](https://github.com/axios/axios) from 1.18.0 to 1.20.0. - [Release notes](https://github.com/axios/axios/releases) - [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md) - [Commits](https://github.com/axios/axios/compare/v1.18.0...v1.20.0) --- updated-dependencies: - dependency-name: axios dependency-version: 1.20.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump ol from 10.9.0 to 10.11.0 in /src/static/app Bumps [ol](https://github.com/openlayers/openlayers) from 10.9.0 to 10.11.0. - [Release notes](https://github.com/openlayers/openlayers/releases) - [Commits](https://github.com/openlayers/openlayers/compare/v10.9.0...v10.11.0) --- updated-dependencies: - dependency-name: ol dependency-version: 10.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps-dev): bump vite from 8.0.16 to 8.3.5 in /src/static/app Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 8.0.16 to 8.3.5. - [Release notes](https://github.com/vitejs/vite/releases) - [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md) - [Commits](https://github.com/vitejs/vite/commits/v8.3.5/packages/vite) --- updated-dependencies: - dependency-name: vite dependency-version: 8.3.5 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump uuid from 14.0.0 to 14.0.3 in /src/static/app Bumps [uuid](https://github.com/uuidjs/uuid) from 14.0.0 to 14.0.3. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v14.0.0...v14.0.3) --- updated-dependencies: - dependency-name: uuid dependency-version: 14.0.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump pinia from 3.0.4 to 4.1.0 in /src/static/app Bumps [pinia](https://github.com/vuejs/pinia) from 3.0.4 to 4.1.0. - [Release notes](https://github.com/vuejs/pinia/releases) - [Commits](https://github.com/vuejs/pinia/compare/v3.0.4...v4.1.0) --- updated-dependencies: - dependency-name: pinia dependency-version: 4.1.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump vue-chartjs from 5.3.3 to 5.3.4 in /src/static/app Bumps [vue-chartjs](https://github.com/apertureless/vue-chartjs) from 5.3.3 to 5.3.4. - [Release notes](https://github.com/apertureless/vue-chartjs/releases) - [Changelog](https://github.com/apertureless/vue-chartjs/blob/main/CHANGELOG.md) - [Commits](https://github.com/apertureless/vue-chartjs/compare/v5.3.3...v5.3.4) --- updated-dependencies: - dependency-name: vue-chartjs dependency-version: 5.3.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump bootstrap-icons in /src/static/app Bumps [bootstrap-icons](https://github.com/twbs/icons) from 1.13.1 to 1.13.2. - [Release notes](https://github.com/twbs/icons/releases) - [Commits](https://github.com/twbs/icons/compare/v1.13.1...v1.13.2) --- updated-dependencies: - dependency-name: bootstrap-icons dependency-version: 1.13.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump npm from 11.13.0 to 12.2.1 in /src/static/app Bumps [npm](https://github.com/npm/cli) from 11.13.0 to 12.2.1. - [Release notes](https://github.com/npm/cli/releases) - [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md) - [Commits](https://github.com/npm/cli/compare/v11.13.0...v12.2.1) --- updated-dependencies: - dependency-name: npm dependency-version: 12.2.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * build(deps): bump electron-builder in /src/static/app Bumps [electron-builder](https://github.com/electron-userland/electron-builder/tree/HEAD/packages/electron-builder) from 26.7.0 to 26.18.0. - [Release notes](https://github.com/electron-userland/electron-builder/releases) - [Changelog](https://github.com/electron-userland/electron-builder/blob/electron-builder@26.18.0/packages/electron-builder/CHANGELOG.md) - [Commits](https://github.com/electron-userland/electron-builder/commits/electron-builder@26.18.0/packages/electron-builder) --- updated-dependencies: - dependency-name: electron-builder dependency-version: 26.18.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: remove arm/v7 due to deprecation * chore: bump some frontend dependencies * chore: attempt to mitigate jose vuln * refactor: rework wgd.sh functions --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
180 lines
4.6 KiB
Docker
180 lines
4.6 KiB
Docker
#
|
|
# AWG GOLANG BUILDING STAGE
|
|
# Base: Alpine
|
|
#
|
|
|
|
# Pull the current golang-alpine image.
|
|
FROM golang:1.27-alpine3.24 AS awg-go-builder
|
|
|
|
# Install build-dependencies.
|
|
RUN apk add --no-cache \
|
|
git \
|
|
gcc \
|
|
musl-dev
|
|
|
|
# Standard working directory for WGDashboard
|
|
RUN mkdir -p /workspace && \
|
|
git clone https://github.com/WGDashboard/amneziawg-go /workspace/awg
|
|
|
|
# Enable CGO compilation for AmneziaWG
|
|
ENV CGO_ENABLED=1
|
|
|
|
# Change directory
|
|
WORKDIR /workspace/awg
|
|
# Compile the binaries
|
|
RUN go version && \
|
|
go mod download && \
|
|
go mod verify && \
|
|
go build -ldflags '-linkmode external -extldflags "-fno-PIC -static"' -v -o /usr/bin
|
|
#
|
|
# AWG TOOLS BUILDING STAGE
|
|
# Base: Alpine
|
|
#
|
|
FROM alpine:3.24 AS awg-tools-builder
|
|
|
|
# Install needed dependencies.
|
|
RUN apk add --no-cache \
|
|
make \
|
|
git \
|
|
build-base \
|
|
linux-headers \
|
|
ca-certificates
|
|
|
|
# Get the workspace ready
|
|
RUN mkdir -p /workspace && \
|
|
git clone https://github.com/WGDashboard/amneziawg-tools /workspace/awg-tools
|
|
|
|
# Change directory
|
|
WORKDIR /workspace/awg-tools/src
|
|
# Compile and change permissions
|
|
RUN make && chmod +x wg*
|
|
|
|
#
|
|
# PIP DEPENDENCY BUILDING
|
|
# Base: Alpine
|
|
#
|
|
|
|
# Use the python-alpine image for building pip dependencies
|
|
FROM python:3.15-alpine3.24 AS pip-builder
|
|
|
|
ARG TARGETPLATFORM
|
|
|
|
# Add the build dependencies and create a Python virtual environment.
|
|
RUN apk add --no-cache \
|
|
build-base \
|
|
pkgconfig \
|
|
python3-dev \
|
|
postgresql-dev \
|
|
libffi-dev \
|
|
libpq \
|
|
linux-headers \
|
|
rust \
|
|
cargo \
|
|
&& mkdir -p /opt/wgdashboard/src \
|
|
&& python3 -m venv /opt/wgdashboard/src/venv
|
|
|
|
# Copy the requirements file into the build layer.
|
|
COPY ./src/requirements.txt /opt/wgdashboard/src
|
|
RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
|
sed -i 's|psycopg\[binary\]|psycopg[c]|' /opt/wgdashboard/src/requirements.txt; \
|
|
fi; \
|
|
cat /opt/wgdashboard/src/requirements.txt
|
|
|
|
# Install the pip packages
|
|
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.15-alpine3.24 AS final
|
|
LABEL maintainer="dselen@nerthus.nl"
|
|
|
|
# Install only the runtime dependencies
|
|
RUN apk add --no-cache \
|
|
iproute2 iptables \
|
|
bash curl procps openrc \
|
|
tzdata wireguard-tools envsubst
|
|
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
|
|
# Copy only the final binaries from the AWG builder stages
|
|
COPY --from=awg-go-builder /usr/bin/amneziawg-go /usr/bin/amneziawg-go
|
|
COPY --from=awg-tools-builder /workspace/awg-tools/src/wg /usr/bin/awg
|
|
COPY --from=awg-tools-builder /workspace/awg-tools/src/wg-quick/linux.bash /usr/bin/awg-quick
|
|
|
|
# Environment variables
|
|
ARG wg_net="10.0.0.1"
|
|
ARG wg_subn="24"
|
|
ARG wg_port="51820"
|
|
ENV TZ="Europe/Amsterdam" \
|
|
global_dns="9.9.9.9" \
|
|
wgd_port="10086" \
|
|
public_ip="" \
|
|
WGDASH=/opt/wgdashboard \
|
|
dynamic_config="true"
|
|
|
|
# Create directories needed for operation
|
|
RUN mkdir /data /configs -p ${WGDASH}/src /etc/amnezia/amneziawg \
|
|
&& echo "name_servers=${global_dns}" >> /etc/resolvconf.conf
|
|
|
|
# Copy application source
|
|
COPY ./src ${WGDASH}/src
|
|
|
|
# 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
|
|
|
|
# First WireGuard interface template
|
|
RUN export out_adapt=$(ip -o -4 route show to default | awk '{print $NF}') \
|
|
&& envsubst < /tmp/wg0.conf.template > /configs/wg0.conf.template \
|
|
&& chmod 600 /configs/wg0.conf.template \
|
|
&& cat /configs/wg0.conf.template
|
|
|
|
# Set a healthcheck to determine the container its health
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD sh -c 'pgrep gunicorn > /dev/null && pgrep tail > /dev/null' || exit 1
|
|
|
|
# Expose ports on the container
|
|
EXPOSE 10086
|
|
WORKDIR $WGDASH/src
|
|
|
|
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|