From 0dabf129db4595a0b2d7554feed079de12affe4f Mon Sep 17 00:00:00 2001 From: Luigi Oliveira Date: Tue, 13 Jun 2023 01:24:19 -0300 Subject: [PATCH] feat: add wg-easy container --- containers/README.md | 20 ++++++++++++++++++++ containers/docker-compose.yaml | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 containers/README.md create mode 100644 containers/docker-compose.yaml diff --git a/containers/README.md b/containers/README.md new file mode 100644 index 0000000..5d84a0c --- /dev/null +++ b/containers/README.md @@ -0,0 +1,20 @@ +# Containers +This folder contain the docker declaration for my homelab changes using portainer, when using Stack option at portainer, you can import a docker compose file from a git repository source and automatically pull changes from the git source. +**TODO**: Explain how to setup this process + +## Services +Here the list of the services that I'm running at my homelab: + +### wg-easy +Link: *https://github.com/wg-easy/wg-easy/* + +I use wg-easy for managing the wireguard environment at my homelab, I want a VPN for some reasons: +- Access my homelab from outside my LAN, so if I need to manage any service I can easily do without the need to expose everything for the internet. +- Maybe If i'm in a insecure network, proxy my home internet with VPN for secure access +- Sometimes my friend have trouble to play an online game because of routing problems from their ISPs, I can proxy my connection to them aswell. + +**Variables** +There's some sensitive variables, we should configure directly in portainer these: +```yaml +- PASSWORD= +``` \ No newline at end of file diff --git a/containers/docker-compose.yaml b/containers/docker-compose.yaml new file mode 100644 index 0000000..3a94e81 --- /dev/null +++ b/containers/docker-compose.yaml @@ -0,0 +1,23 @@ +version: "3.8" + +services: + wg-easy: + environment: + - WG_HOST=home.marioverde.com.br + # ⚠️ Change this in Portainer configs, see README + - PASSWORD=foobar123 + image: weejewel/wg-easy + container_name: wg-easy + hostname: wg-easy + volumes: + - ~/.wg-easy:/etc/wireguard + ports: + - "51820:51820/udp" + - "51821:51821/tcp" + restart: unless-stopped + cap_add: + - NET_ADMIN + - SYS_MODULE + sysctls: + - net.ipv4.ip_forward=1 + - net.ipv4.conf.all.src_valid_mark=1 \ No newline at end of file