1
0

fix:修正新版wireguard-ui

This commit is contained in:
okxlin
2024-02-19 23:41:13 +08:00
parent 0f0060fc7e
commit 833bc5f9a2
11 changed files with 69 additions and 272 deletions

View File

@@ -1,6 +1,5 @@
CONTAINER_NAME="wireguard-ui"
DATA_PATH="./data"
PANEL_APP_PORT_HTTP="40073"
WEBUI_PWD="password"
WEBUI_USER="admin"
WIREGUARD_PORT="51820"
PANEL_APP_PORT_WIREGUARD="51820"

View File

@@ -10,19 +10,12 @@ additionalProperties:
type: number
- default: 51820
edit: true
envKey: WIREGUARD_PORT
envKey: PANEL_APP_PORT_WIREGUARD
labelEn: Wireguard port
labelZh: Wireguard端口
labelZh: Wireguard 端口
required: true
rule: paramPort
type: number
- default: ./data
edit: true
envKey: DATA_PATH
labelEn: Data folder path
labelZh: 数据文件夹路径
required: true
type: text
- default: "admin"
edit: true
envKey: WEBUI_USER
@@ -35,7 +28,7 @@ additionalProperties:
envKey: WEBUI_PWD
labelEn: Webui password
labelZh: 网页密码
random: false
required: false
random: true
required: true
rule: paramComplexity
type: password

View File

View File

@@ -1,21 +1,5 @@
version: "3"
services:
wireguard:
container_name: ${CONTAINER_NAME}-wireguard
restart: always
networks:
- 1panel-network
cap_add:
- NET_ADMIN
volumes:
- ${DATA_PATH}/config:/config
ports:
- "${PANEL_APP_PORT_HTTP}:5000"
- "${WIREGUARD_PORT}:51820/udp"
image: linuxserver/wireguard:latest
labels:
createdBy: "Apps"
wireguard-ui:
container_name: ${CONTAINER_NAME}
restart: always
@@ -32,11 +16,13 @@ services:
- WGUI_USERNAME=${WEBUI_USER}
- WGUI_PASSWORD=${WEBUI_PWD}
- WG_CONF_TEMPLATE
- WGUI_MANAGE_START=true
- WGUI_MANAGE_START=false
- WGUI_MANAGE_RESTART=true
- WGUI_SERVER_LISTEN_PORT=${PANEL_APP_PORT_WIREGUARD}
- BIND_ADDRESS=0.0.0.0:${PANEL_APP_PORT_HTTP}
volumes:
- ${DATA_PATH}/db:/app/db
- ${DATA_PATH}/config:/etc/wireguard
- ./data/db:/app/db
- ./data/config:/etc/wireguard
image: ngoduykhanh/wireguard-ui:latest
logging:
driver: json-file
@@ -45,7 +31,27 @@ services:
labels:
createdBy: "Apps"
wireguard:
container_name: ${CONTAINER_NAME}-wireguard
restart: always
networks:
- 1panel-network
cap_add:
- NET_ADMIN
volumes:
- ./data/config:/config
ports:
- "${PANEL_APP_PORT_HTTP}:${PANEL_APP_PORT_HTTP}"
- "${PANEL_APP_PORT_WIREGUARD}:${PANEL_APP_PORT_WIREGUARD}/udp"
environment:
- PUID=1000
- PGID=1000
- PEERS=1
- SERVERPORT=${PANEL_APP_PORT_WIREGUARD}
image: linuxserver/wireguard:latest
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

View File

@@ -0,0 +1,3 @@
#!/bin/bash
chown -R 1000:1000 data