0
0
mirror of https://github.com/vx3r/wg-gen-web.git synced 2024-12-18 00:13:23 +00:00

Merge pull request #84 from vx3r/v2

update npm
This commit is contained in:
vx3r 2021-06-15 14:54:07 +02:00 committed by GitHub
commit 75b1e982c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 516 additions and 693 deletions

27
dev.dockerfile Normal file
View File

@ -0,0 +1,27 @@
ARG COMMIT="N/A"

FROM golang AS build-back
WORKDIR /app
ARG COMMIT
COPY . .
RUN go build -o wg-gen-web-linux -gcflags="all=-N -l" -ldflags="-X 'github.com/vx3r/wg-gen-web/version.Version=${COMMIT}'" github.com/vx3r/wg-gen-web/cmd/wg-gen-web
RUN go get github.com/go-delve/delve/cmd/dlv

FROM node:lts AS build-front
WORKDIR /app
COPY ui/package*.json ./
RUN npm install
COPY ui/ ./
RUN npm run build

FROM debian
WORKDIR /app
COPY --from=build-back /app/wg-gen-web-linux .
COPY --from=build-back /go/bin/dlv .
COPY --from=build-front /app/dist ./ui/dist
COPY .env .
RUN chmod +x ./wg-gen-web-linux
RUN apt-get update && apt-get install -y ca-certificates
EXPOSE 8080

CMD ["/app/dlv", "--listen=:40000", "--headless=true", "--api-version=2", "--accept-multiclient", "exec", "/app/wg-gen-web-linux"]

View File

@ -22,6 +22,7 @@ type ClientStatus struct {
TransmittedBytes int `json:"transmittedBytes"`
}

// MarshalJSON structure to json
func (c *ClientStatus) MarshalJSON() ([]byte, error) {

duration := fmt.Sprintf("%v ago", c.LastHandshakeRelative)

1165
ui/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,20 +10,20 @@
"axios": "^0.21.1",
"is-cidr": "^4.0.2",
"moment": "^2.29.1",
"vue": "^2.6.12",
"vue": "^2.6.14",
"vue-axios": "^3.2.4",
"vue-moment": "^4.1.0",
"vue-router": "^3.5.1",
"vuetify": "^2.4.9",
"vuetify": "^2.5.3",
"vuex": "^3.6.2"
},
"devDependencies": {
"@vue/cli-plugin-router": "^4.5.12",
"@vue/cli-service": "^4.5.12",
"sass": "^1.32.8",
"sass-loader": "^10.1.1",
"vue-cli-plugin-vuetify": "^2.3.1",
"vue-template-compiler": "^2.6.12",
"@vue/cli-plugin-router": "^4.5.13",
"@vue/cli-service": "^4.5.13",
"sass": "^1.35.0",
"sass-loader": "^10.2.0",
"vue-cli-plugin-vuetify": "^2.4.1",
"vue-template-compiler": "^2.6.14",
"vuetify-loader": "^1.7.2"
}
}