From eb7c0b0e995ffb786ce562b6c9cbe2b1a8ef6312 Mon Sep 17 00:00:00 2001 From: Matteo Del Monte Date: Mon, 31 Jan 2022 20:48:58 +0100 Subject: [PATCH] Docker compose example --- README.md | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6ae66b35..ec822cad 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,41 @@ $ docker run -d \ The Web UI will now be available on `http://0.0.0.0:51821`. +#### Docker Compose example +##### - Compose + +
+version: '3.8'
+
+services:
+    wireguard:
+        container_name: wg-easy
+        image: weejewel/wg-easy
+        volumes:
+            - /wireguard:/etc/wireguard
+        env_file:
+            - /wireguard/wireguard.env
+        ports:
+            - '61200:51820/udp'
+            - '80:51821/tcp'
+        cap_add:
+            - NET_ADMIN
+            - SYS_MODULE
+        sysctls:
+            - net.ipv4.ip_forward=1
+            - net.ipv4.conf.all.src_valid_mark=1
+        restart: unless-stopped
+
+ +##### - Env file +
+WG_HOST=vpn.myserver.com`
+WG_PORT=61820
+WG_DEFAULT_DNS=1.1.1.1, 1.0.0.1
+WG_ALLOWED_IPS=0.0.0.0/0, ::/0
+PASSWORD=foobar123
+
+ > 💡 Your configuration files will be saved in `~/.wg-easy` ### 3. Sponsor @@ -103,4 +138,4 @@ docker rm wg-easy docker pull weejewel/wg-easy ``` -And then run the `docker run -d \ ...` command above again. \ No newline at end of file +And then run the `docker run -d \ ...` command above again.