forked from Place1/wg-access-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change react template, format code and added some comments
- Loading branch information
1 parent
8e35e75
commit d2ba60e
Showing
17 changed files
with
145 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,63 @@ | ||
### Default ignore for this project ### | ||
config.yaml | ||
data/ | ||
./wg-access-server | ||
|
||
### Code ### | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
### Go ### | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the go coverage tool, specifically when used with LiteIDE | ||
*.out | ||
|
||
### Go Patch ### | ||
/vendor/ | ||
/Godeps/ | ||
|
||
### react ### | ||
.DS_* | ||
*.log | ||
logs | ||
**/*.backup.* | ||
**/*.back.* | ||
|
||
### website react app ### | ||
|
||
# dependencies | ||
website/node_modules | ||
website/.pnp | ||
website/.pnp.js | ||
|
||
# testing | ||
website/coverage | ||
|
||
# production | ||
website/build | ||
|
||
# misc | ||
website/.DS_Store | ||
website/.env.local | ||
website/.env.development.local | ||
website/.env.test.local | ||
website/.env.production.local | ||
|
||
website/npm-debug.log* | ||
website/yarn-debug.log* | ||
website/yarn-error.log* | ||
website/yarn.lock | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,51 @@ | ||
### Build stage for the website frontend | ||
FROM node:10 as website | ||
|
||
WORKDIR /code | ||
|
||
COPY ./website/package.json ./ | ||
COPY ./website/package-lock.json ./ | ||
|
||
# install dependency | ||
RUN npm install | ||
|
||
COPY ./website/ ./ | ||
|
||
RUN npm run build | ||
|
||
### Build stage for the website backend server | ||
FROM golang:1.13.8 as server | ||
|
||
WORKDIR /code | ||
|
||
# environment variable | ||
ENV GOOS=linux | ||
ENV GARCH=amd64 | ||
ENV CGO_ENABLED=0 | ||
ENV GO111MODULE=on | ||
|
||
COPY ./go.mod ./ | ||
COPY ./go.sum ./ | ||
|
||
RUN go mod download | ||
|
||
COPY ./proto/ ./proto/ | ||
COPY ./main.go ./main.go | ||
COPY ./internal/ ./internal | ||
|
||
RUN go build -o server | ||
|
||
### Server | ||
FROM alpine:3.10 | ||
RUN apk add iptables | ||
RUN apk add wireguard-tools | ||
|
||
# environment variable | ||
ENV CONFIG="/config.yaml" | ||
ENV STORAGE_DIRECTORY="/data" | ||
|
||
RUN apk add iptables | ||
RUN apk add wireguard-tools | ||
|
||
# Copy the final build for the frontend and backend | ||
COPY --from=server /code/server /server | ||
COPY --from=website /code/build /website/build | ||
CMD /server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
apiVersion: v1 | ||
entries: | ||
wg-access-server: | ||
- apiVersion: v2 | ||
appVersion: 0.0.9 | ||
created: "2020-03-08T15:27:38.5587792+11:00" | ||
description: A Wireguard VPN Access Server | ||
digest: e8d795290f577d5d5678619dac42e1a667407aa7128a682da30f26db9f383a1c | ||
name: wg-access-server | ||
urls: | ||
- https://place1.github.io/wg-access-server/charts/wg-access-server-0.0.9.tgz | ||
version: 0.0.9 | ||
- apiVersion: v2 | ||
appVersion: 0.0.9 | ||
created: "2020-03-08T15:27:38.5587792+11:00" | ||
description: A Wireguard VPN Access Server | ||
digest: e8d795290f577d5d5678619dac42e1a667407aa7128a682da30f26db9f383a1c | ||
name: wg-access-server | ||
urls: | ||
- https://place1.github.io/wg-access-server/charts/wg-access-server-0.0.9.tgz | ||
version: 0.0.9 | ||
generated: "2020-03-08T15:27:38.5581672+11:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +0,0 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
yarn.lock | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.