diff --git a/Dockerfile b/Dockerfile index 7b3e5e4..3e1812f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,11 @@ RUN apk add --update --no-cache ${BUILD_DEPENDENCIES} WORKDIR /build -# Add sources -COPY . /build +# Add dependencies +COPY go.mod /build +COPY go.sum /build +COPY package.json /build +COPY yarn.lock /build # Prepare assets RUN yarn install --pure-lockfile --production && \ @@ -39,13 +42,16 @@ RUN mkdir -p assets/plugins && \ /build/node_modules/jquery-tags-input/ \ assets/plugins/ -# Move custom assets -RUN cp -r /build/custom/ assets/ - # Get go modules and build tool RUN go mod download && \ go get github.com/GeertJohan/go.rice/rice +# Add sources +COPY . /build + +# Move custom assets +RUN cp -r /build/custom/ assets/ + # Build RUN rice embed-go && \ CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o wg-ui . diff --git a/README.md b/README.md index 0940706..ee3bb44 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,8 @@ Set the `SESSION_SECRET` environment variable to a random value. To use custom `wg.conf` template set the `WG_CONF_TEMPLATE` environment variable to a path to such file. Make sure `wireguard-ui` will be able to work with it - use [default template](templates/wg.conf) for reference. +Set the `BASE_PATH` environment variable if you run wireguard-ui under a subpath of your reverse proxy virtual host (e.g. /wireguard). + In order to sent the wireguard configuration to clients via email, set the following environment variables: - using SendGrid API diff --git a/custom/js/helper.js b/custom/js/helper.js index b742472..86f6dc7 100644 --- a/custom/js/helper.js +++ b/custom/js/helper.js @@ -26,7 +26,7 @@ function renderClientList(data) {
- Download + Download
{{if .baseData.CurrentUser}} - {{end}}
@@ -75,7 +75,7 @@