0
0
mirror of https://github.com/vx3r/wg-gen-web.git synced 2024-11-04 17:31:17 +00:00

Merge remote-tracking branch 'origin/master'

This commit is contained in:
vx3r 2020-02-03 16:20:06 +09:00
commit 5cb19c365f
3 changed files with 22 additions and 2 deletions

20
Dockerfile.dev Normal file
View File

@ -0,0 +1,20 @@
FROM golang as build-back
WORKDIR /wg-gen-web
ADD . .
RUN go build -o wg-gen-web-linux-amd64

FROM node:10-alpine as build-front
WORKDIR /ui
ADD ui .
RUN npm install
RUN npm run build

FROM debian:stable-slim
WORKDIR /app
COPY --from=build-back /wg-gen-web/wg-gen-web-linux-amd64 .
COPY --from=build-front /ui/dist ./ui/dist
ADD .env .
RUN chmod +x ./wg-gen-web-linux-amd64
EXPOSE 8080

CMD ["/app/wg-gen-web-linux-amd64"]

View File

@ -124,7 +124,7 @@ Feel free to modify this file in order to use your existing keys
## What is out of scope

* Generation or application of any `iptables` or `nftables` rules
* Application of configuration to WireGuard
* Application of configuration to WireGuard by Wg Gen Web itself

## TODO


View File

@ -337,7 +337,7 @@ func UpdateServer(server *model.Server) (*model.Server, error) {

// Write object to disk
func serialize(id string, c interface{}) error {
b, err := json.Marshal(c)
b, err := json.MarshalIndent(c, "", " ")
if err != nil {
return err
}