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.
Merge pull request Place1#13 from antoinebou13/update
Small update to the website and the readme and added a docker-compose file
- Loading branch information
Showing
19 changed files
with
192 additions
and
95 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,56 @@ | ||
### 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 | ||
RUN apk add curl | ||
|
||
# Copy the final build for the frontend and backend | ||
COPY --from=server /code/server /server | ||
COPY --from=website /code/build /website/build | ||
|
||
HEALTHCHECK --interval=5m --timeout=3s CMD curl -f http://localhost:8000/ || exit 1 | ||
|
||
# Command to start the server | ||
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: "3.7" | ||
services: | ||
wg-access-server: | ||
# to build the docker image from the source | ||
# build: | ||
# dockerfile: Dockerfile | ||
# context: . | ||
image: place1/wg-access-server | ||
container_name: wg-access-server | ||
cap_add: | ||
- NET_ADMIN | ||
volumes: | ||
- "wg-access-server-data:/data" | ||
# - "config.yaml/config.yaml" # if you have a custom confg file | ||
ports: | ||
- "8000:8000/tcp" | ||
- "51820:51820/udp" | ||
devices: | ||
- "/dev/net/tun:/dev/net/tun" | ||
|
||
# shared volumes with the host | ||
volumes: | ||
wg-access-server-data: | ||
driver: local |
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 was deleted.
Oops, something went wrong.
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.