mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-16 18:48:15 +03:00
*: allows for BASE_PATH configuration (#183)
This commit is contained in:
parent
90bb2851bf
commit
87b08a8f7c
13 changed files with 108 additions and 84 deletions
16
Dockerfile
16
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 .
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue