Renaming to ovpn-admin
This commit is contained in:
parent
5c5c874788
commit
9629f51e76
14 changed files with 29 additions and 27 deletions
|
@ -16,6 +16,7 @@ frontend/node_modules
|
|||
openvpn-web-ui
|
||||
openvpn-ui
|
||||
openvpn-admin
|
||||
ovpn-admin
|
||||
|
||||
docker-compose.yaml
|
||||
docker-compose-slave.yaml
|
||||
docker-compose-slave.yaml
|
||||
|
|
6
.github/workflows/publish-latest.yaml
vendored
6
.github/workflows/publish-latest.yaml
vendored
|
@ -17,14 +17,14 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASS }}
|
||||
repository: flant/openvpn-admin
|
||||
repository: flant/ovpn-admin
|
||||
tags: openvpn-latest
|
||||
dockerfile: Dockerfile.openvpn
|
||||
- name: Push openvpn-admin image to Docker Hub
|
||||
- name: Push ovpn-admin image to Docker Hub
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASS }}
|
||||
repository: flant/openvpn-admin
|
||||
repository: flant/ovpn-admin
|
||||
tags: latest
|
||||
dockerfile: Dockerfile
|
||||
|
|
6
.github/workflows/publish-tag.yaml
vendored
6
.github/workflows/publish-tag.yaml
vendored
|
@ -21,14 +21,14 @@ jobs:
|
|||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASS }}
|
||||
repository: flant/openvpn-admin
|
||||
repository: flant/ovpn-admin
|
||||
tags: openvpn-${{ steps.get_version.outputs.VERSION }}
|
||||
dockerfile: Dockerfile.openvpn
|
||||
- name: Push openvpn-admin image to Docker Hub
|
||||
- name: Push ovpn-admin image to Docker Hub
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_PASS }}
|
||||
repository: flant/openvpn-admin
|
||||
repository: flant/ovpn-admin
|
||||
tags: ${{ steps.get_version.outputs.VERSION }}
|
||||
dockerfile: Dockerfile
|
||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -7,6 +7,7 @@ ccd_slave
|
|||
openvpn-web-ui
|
||||
openvpn-ui
|
||||
openvpn-admin
|
||||
ovpn-admin
|
||||
frontend/node_modules
|
||||
|
||||
main-packr.go
|
||||
|
@ -17,4 +18,4 @@ packrd/
|
|||
*.suo
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sln
|
||||
|
|
|
@ -5,11 +5,11 @@ RUN cd /app && npm install && npm run build
|
|||
FROM golang:1.14.2-buster AS backend-builder
|
||||
COPY --from=frontend-builder /app/static /app/frontend/static
|
||||
COPY . /app
|
||||
RUN go get -u github.com/gobuffalo/packr/v2/packr2 && cd /app && packr2 && env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags='-linkmode external -extldflags "-static" -s -w' -o openvpn-admin && packr2 clean
|
||||
RUN go get -u github.com/gobuffalo/packr/v2/packr2 && cd /app && packr2 && env CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags='-linkmode external -extldflags "-static" -s -w' -o ovpn-admin && packr2 clean
|
||||
|
||||
FROM alpine:3.13
|
||||
WORKDIR /app
|
||||
COPY --from=backend-builder /app/openvpn-admin /app
|
||||
COPY --from=backend-builder /app/ovpn-admin /app
|
||||
RUN apk add --update bash easy-rsa && \
|
||||
ln -s /usr/share/easy-rsa/easyrsa /usr/local/bin && \
|
||||
wget https://github.com/pashcovich/openvpn-user/releases/download/v1.0.3-rc.1/openvpn-user-linux-amd64.tar.gz -O - | tar xz -C /usr/local/bin && \
|
||||
|
|
2
build.sh
2
build.sh
|
@ -7,6 +7,6 @@ cd frontend && npm install && npm run build && cd ..
|
|||
|
||||
packr2
|
||||
|
||||
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags "-linkmode external -extldflags -static -s -w" -o openvpn-admin
|
||||
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -ldflags "-linkmode external -extldflags -static -s -w" -o ovpn-admin
|
||||
|
||||
packr2 clean
|
||||
|
|
|
@ -13,15 +13,15 @@ services:
|
|||
- NET_ADMIN
|
||||
ports:
|
||||
- 7778:1194 # for openvpn
|
||||
- 8081:8080 # for openvpn-admin because of network_mode
|
||||
- 8081:8080 # for ovpn-admin because of network_mode
|
||||
volumes:
|
||||
- ./easyrsa_slave:/etc/openvpn/easyrsa
|
||||
- ./ccd_slave:/etc/openvpn/ccd
|
||||
openvpn-admin:
|
||||
ovpn-admin:
|
||||
build:
|
||||
context: .
|
||||
image: openvpn-admin:local
|
||||
command: /app/openvpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --master.host="http://172.20.0.1:8080" --role="slave" --ovpn.server="127.0.0.1:7777:tcp" --ovpn.server="127.0.0.1:7778:tcp" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt"
|
||||
image: ovpn-admin:local
|
||||
command: /app/ovpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --master.host="http://172.20.0.1:8080" --role="slave" --ovpn.server="127.0.0.1:7777:tcp" --ovpn.server="127.0.0.1:7778:tcp" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt"
|
||||
environment:
|
||||
- OPVN_SLAVE=1
|
||||
network_mode: service:openvpn
|
||||
|
|
|
@ -11,15 +11,15 @@ services:
|
|||
- NET_ADMIN
|
||||
ports:
|
||||
- 7777:1194 # for openvpn
|
||||
- 8080:8080 # for openvpn-admin because of network_mode
|
||||
- 8080:8080 # for ovpn-admin because of network_mode
|
||||
volumes:
|
||||
- ./easyrsa_master:/etc/openvpn/easyrsa
|
||||
- ./ccd_master:/etc/openvpn/ccd
|
||||
openvpn-admin:
|
||||
ovpn-admin:
|
||||
build:
|
||||
context: .
|
||||
image: openvpn-admin:local
|
||||
command: /app/openvpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt" --ovpn.server="127.0.0.1:7777:tcp"
|
||||
image: ovpn-admin:local
|
||||
command: /app/ovpn-admin --debug --ovpn.network="172.16.100.0/22" --master.sync-token="TOKEN" --easyrsa.path="/mnt/easyrsa" --easyrsa.index-path="/mnt/easyrsa/pki/index.txt" --ovpn.server="127.0.0.1:7777:tcp"
|
||||
network_mode: service:openvpn
|
||||
volumes:
|
||||
- ./easyrsa_master:/mnt/easyrsa
|
||||
|
|
2
frontend/package-lock.json
generated
2
frontend/package-lock.json
generated
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "openvpn-admin",
|
||||
"name": "ovpn-admin",
|
||||
"version": "1.0.1a",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "openvpn-admin",
|
||||
"name": "ovpn-admin",
|
||||
"description": "Vue.js admin ui for openvpn and easyrsa",
|
||||
"version": "1.0.1a",
|
||||
"author": "vitaliy.snurnitsin@gmail.com",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>openvpn-admin</title>
|
||||
<title>ovpn-admin</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="dist/style.min.js"></script>
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module openvpn-admin
|
||||
module ovpn-admin
|
||||
|
||||
go 1.14
|
||||
|
||||
|
|
4
main.go
4
main.go
|
@ -36,8 +36,8 @@ const (
|
|||
)
|
||||
|
||||
var (
|
||||
listenHost = kingpin.Flag("listen.host","host for openvpn-admin").Default("0.0.0.0").String()
|
||||
listenPort = kingpin.Flag("listen.port","port for openvpn-admin").Default("8080").String()
|
||||
listenHost = kingpin.Flag("listen.host","host for ovpn-admin").Default("0.0.0.0").String()
|
||||
listenPort = kingpin.Flag("listen.port","port for ovpn-admin").Default("8080").String()
|
||||
serverRole = kingpin.Flag("role","server role master or slave").Default("master").HintOptions("master", "slave").String()
|
||||
masterHost = kingpin.Flag("master.host","url for master server").Default("http://127.0.0.1").String()
|
||||
masterBasicAuthUser = kingpin.Flag("master.basic-auth.user","user for basic auth on master server url").Default("").String()
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
project: openvpn-admin
|
||||
project: ovpn-admin
|
||||
configVersion: 1
|
||||
|
||||
---
|
||||
image: openvpn-admin
|
||||
image: ovpn-admin
|
||||
dockerfile: Dockerfile
|
||||
|
||||
---
|
||||
|
|
Loading…
Reference in a new issue