From 9d4d80fd4036805c18f0d0ff20fc090b8e6f111a Mon Sep 17 00:00:00 2001 From: Kamil118 Date: Sat, 22 Aug 2026 18:32:43 +0000 Subject: [PATCH] Added Diun and Wireguard --- backup.sh | 7 +++++-- diun/compose.yaml | 26 ++++++++++++++++++++++++++ start_everything.sh | 4 ++++ wireguard/compose.yaml | 27 +++++++++++++++++++++++++++ 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 diun/compose.yaml create mode 100644 wireguard/compose.yaml diff --git a/backup.sh b/backup.sh index 3a23917..7774c54 100755 --- a/backup.sh +++ b/backup.sh @@ -67,6 +67,8 @@ sudo rsync -avR --numeric-ids palworld/{compose.yaml,.env,palworld/Pal/Saved/Sav homepage \ gitea \ postgres_backup \ + diun/compose.yaml \ + wireguard \ "${BASE_NAME}_tmp/" #backup has been created, remove the cleanup trap, restore services before uploading backup @@ -107,8 +109,9 @@ find . -maxdepth 1 -type f -name "full_backup_*.tar.xz.gpg" -printf '%T@ %p\n' | #cleanup B2 echo "Evaluating remote retention..." -rclone delete "${B2_REMOTE}" --min-age 60d --rmdirs --log-file="$HOME/backup.log" +rclone delete "${BACKUP_REMOTE}" --min-age 60d --rmdirs --log-file="$HOME/backup.log" echo "Backup Complete" -#todo make something to test bakcups \ No newline at end of file +#todo make something to test bakcups +#gpg --batch -d --passphrase "password_here" full_backup_2026-08-19_01-00.tar.xz.gpg | xz -d -T0 | tar xf - \ No newline at end of file diff --git a/diun/compose.yaml b/diun/compose.yaml new file mode 100644 index 0000000..7dcf502 --- /dev/null +++ b/diun/compose.yaml @@ -0,0 +1,26 @@ +name: diun + +services: + diun: + image: crazymax/diun:latest + container_name: diun + command: serve + volumes: + - "./data:/data" + - "/var/run/docker.sock:/var/run/docker.sock" + environment: + - "TZ=Europe/Paris" + - "DIUN_WATCH_WORKERS=20" + - "DIUN_WATCH_SCHEDULE=0 */6 * * *" + - "DIUN_WATCH_JITTER=30s" + - "DIUN_PROVIDERS_DOCKER=true" + - "DIUN_PROVIDERS_DOCKER_WATCHBYDEFAULT=true" + healthcheck: + test: ["CMD", "diun", "healthcheck"] + interval: 30s + timeout: 5s + retries: 3 + start_period: 60s + labels: + - "diun.enable=true" + restart: unless-stopped \ No newline at end of file diff --git a/start_everything.sh b/start_everything.sh index 079c603..1c253bd 100755 --- a/start_everything.sh +++ b/start_everything.sh @@ -32,4 +32,8 @@ docker compose -f ~/gitea/compose.yaml --project-directory ~/gitea up -d #todo?: make sure database exists docker compose -f ~/nextcloud/compose.yaml --project-directory ~/nextcloud up -d +docker compose -f ~/wireguard/compose.yaml --project-directory ~/wireguard up -d + +docker compose -f ~/diun/compose.yaml --project-directory ~/diun up -d + printf "Service creation complete\n" diff --git a/wireguard/compose.yaml b/wireguard/compose.yaml new file mode 100644 index 0000000..0fff563 --- /dev/null +++ b/wireguard/compose.yaml @@ -0,0 +1,27 @@ +services: + wireguard: + image: lscr.io/linuxserver/wireguard:latest + container_name: wireguard + cap_add: + - NET_ADMIN + - SYS_MODULE + environment: + - PUID=1000 + - PGID=1000 + - TZ=Europe/Warsaw + - SERVERURL=foxgirls.date + - SERVERPORT=51820 + - PEERS=pc,phone,pcMaint + - PEERDNS=1.1.1.1 + - INTERNAL_SUBNET=10.13.13.0 + - ALLOWEDIPS=0.0.0.0/0 + volumes: + - ./config:/config + - /lib/modules:/lib/modules + ports: + - 51820:51820/udp + sysctls: + - net.ipv4.conf.all.src_valid_mark=1 + networks: + - VPN + restart: unless-stopped