From 724cff6fbd544dab3d4aac47e3d98afd274b735f Mon Sep 17 00:00:00 2001 From: Raine Date: Mon, 23 Oct 2023 02:16:24 +0200 Subject: [PATCH] feat: wireguard --- .../custom/nginx/conf.d/default.conf | 10 +---- .../docker-compose.wireguard.yml | 38 +++++++++++++++++++ 2 files changed, 39 insertions(+), 9 deletions(-) create mode 100644 servers/link/docker-compose.d/docker-compose.wireguard.yml diff --git a/servers/link/docker-compose.d/custom/nginx/conf.d/default.conf b/servers/link/docker-compose.d/custom/nginx/conf.d/default.conf index 7c8d4b2..cd16319 100644 --- a/servers/link/docker-compose.d/custom/nginx/conf.d/default.conf +++ b/servers/link/docker-compose.d/custom/nginx/conf.d/default.conf @@ -2,16 +2,8 @@ server { listen 80; server_name link.ixvd.net; - # SSL is managed by certbot, no need for a ssl listen; it will be generated automagically! - - # default html page location / { - root /usr/share/nginx/html; - index index.html index.htm; + proxy_pass http://wireguard:5000; } - error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } } diff --git a/servers/link/docker-compose.d/docker-compose.wireguard.yml b/servers/link/docker-compose.d/docker-compose.wireguard.yml new file mode 100644 index 0000000..f3f2fa2 --- /dev/null +++ b/servers/link/docker-compose.d/docker-compose.wireguard.yml @@ -0,0 +1,38 @@ +version: '2.2' + +services: + wireguard: + image: linuxserver/wireguard:latest + container_name: wireguard + cap_add: + - NET_ADMIN + volumes: + - /srv/wg/config:/config + ports: + - "51820:51820/udp" + networks: + - proxy + - internal + restart: unless-stopped + + wireguard-ui: + image: ngoduykhanh/wireguard-ui:latest + container_name: wireguard-ui + depends_on: + - wireguard + cap_add: + - NET_ADMIN + network_mode: service:wireguard + env_file: + - /etc/ixvd/secrets/env/wg-ui.env + environment: + - WGUI_MANAGE_START=true + - WGUI_MANAGE_RESTART=true + restart: unless-stopped + logging: + driver: json-file + options: + max-size: 50m + volumes: + - /srv/wg/other/ui-db:/app/db + - /srv/wg/config:/etc/wireguard \ No newline at end of file