Move deploy config to .env with wg1/51821 defaults for server+client coexistence
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent
c8922b62ed
commit
d97ae64c85
@@ -0,0 +1,18 @@
|
|||||||
|
# Copy to .env and fill in. .env is gitignored.
|
||||||
|
|
||||||
|
# Public IP or domain that clients use to reach this server (required)
|
||||||
|
WG_HOST=
|
||||||
|
|
||||||
|
# WireGuard interface and port managed by the panel.
|
||||||
|
# Use wg1/51821 so it can coexist with a local wg0 client tunnel.
|
||||||
|
WG_INTERFACE=wg1
|
||||||
|
WG_PORT=51821
|
||||||
|
WG_SUBNET=10.8.0.0/24
|
||||||
|
WG_DNS=8.8.8.8
|
||||||
|
|
||||||
|
# Admin panel login
|
||||||
|
ADMIN_USERNAME=admin
|
||||||
|
ADMIN_PASSWORD=password
|
||||||
|
|
||||||
|
# Session signing / key encryption secret. Generate with: openssl rand -hex 32
|
||||||
|
SECRET_KEY=secret
|
||||||
@@ -2,4 +2,6 @@
|
|||||||
__pycache__/
|
__pycache__/
|
||||||
*.pyc
|
*.pyc
|
||||||
data/
|
data/
|
||||||
|
wg-admin-data/
|
||||||
|
wg-config/
|
||||||
.env
|
.env
|
||||||
|
|||||||
+9
-13
@@ -11,21 +11,17 @@ services:
|
|||||||
devices:
|
devices:
|
||||||
- /dev/net/tun:/dev/net/tun
|
- /dev/net/tun:/dev/net/tun
|
||||||
ports:
|
ports:
|
||||||
- "51820:51820/udp"
|
- "${WG_PORT:-51821}:${WG_PORT:-51821}/udp"
|
||||||
- "127.0.0.1:8000:8000/tcp"
|
- "127.0.0.1:8000:8000/tcp"
|
||||||
environment:
|
environment:
|
||||||
WG_INTERFACE: wg0
|
WG_INTERFACE: ${WG_INTERFACE:-wg1}
|
||||||
WG_HOST: ${WG_HOST:?set WG_HOST to your public IP or domain}
|
WG_HOST: ${WG_HOST:?set WG_HOST to your public IP or domain}
|
||||||
WG_PORT: "51820"
|
WG_PORT: ${WG_PORT:-51821}
|
||||||
WG_SUBNET: 10.8.0.0/24
|
WG_SUBNET: ${WG_SUBNET:-10.8.0.0/24}
|
||||||
WG_DNS: 1.1.1.1
|
WG_DNS: ${WG_DNS:-8.8.8.8}
|
||||||
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
|
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
|
||||||
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?set ADMIN_PASSWORD}
|
ADMIN_PASSWORD: ${ADMIN_PASSWORD:?set ADMIN_PASSWORD in .env}
|
||||||
SECRET_KEY: ${SECRET_KEY:?set SECRET_KEY to a long random string}
|
SECRET_KEY: ${SECRET_KEY:?set SECRET_KEY in .env}
|
||||||
volumes:
|
volumes:
|
||||||
- wg-admin-data:/opt/wireguard-admin/data
|
- ./wg-admin-data:/opt/wireguard-admin/data
|
||||||
- wg-config:/etc/wireguard
|
- ./wg-config:/etc/wireguard
|
||||||
|
|
||||||
volumes:
|
|
||||||
wg-admin-data:
|
|
||||||
wg-config:
|
|
||||||
|
|||||||
Reference in New Issue
Block a user