Created
June 7, 2024 13:01
-
-
Save verhovensky/39fe50182eec0586a675ce7e62dfdae6 to your computer and use it in GitHub Desktop.
Docker wireguard (with API)
This file contains hidden or 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
services: | |
wg-gen-web: | |
image: vx3r/wg-gen-web:latest | |
container_name: wg-gen-web | |
restart: unless-stopped | |
ports: | |
- "8080:8080" | |
environment: | |
- WG_CONF_DIR=/data | |
- WG_INTERFACE_NAME=wg0.conf | |
- SMTP_HOST=smtp.gmail.com | |
- SMTP_PORT=587 | |
- [email protected] | |
- SMTP_PASSWORD=**************** | |
- SMTP_FROM=Example <[email protected]> | |
- OAUTH2_PROVIDER_NAME=github | |
- OAUTH2_PROVIDER=https://github.com | |
- OAUTH2_CLIENT_ID=****************** | |
- OAUTH2_CLIENT_SECRET=****************** | |
- OAUTH2_REDIRECT_URL=https://wg-gen-web.example.com | |
- WG_STATS_API=$BRIDGE_GATEWAY_ADDRESS:8182 | |
volumes: | |
- /etc/wireguard:/data | |
wg-api: | |
image: james/wg-api:latest | |
container_name: wg-json-api | |
restart: unless-stopped | |
cap_add: | |
- NET_ADMIN | |
network_mode: "host" | |
command: wg-api --device=wg0 --listen=$BRIDGE_GATEWAY_ADDRESS:8182 | |
# Ananlytics can be send to SIEM-like systems using wg-json tool | |
# https://git.zx2c4.com/wireguard-tools/tree/contrib/json/wg-json |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment