From eb44d3c9288eb04d31541f03ee24f4e475ddcceb Mon Sep 17 00:00:00 2001 From: Awin Huang Date: Tue, 6 Feb 2024 15:44:17 +0800 Subject: [PATCH] vault backup: 2024-02-06 15:44:17 --- 00. Inbox/樹莓派/00. 樹莓派.canvas | 15 +++++++++------ 00. Inbox/樹莓派/Watchtower.md | 12 ++++++++++++ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/00. Inbox/樹莓派/00. 樹莓派.canvas b/00. Inbox/樹莓派/00. 樹莓派.canvas index a08521d..816fc6c 100644 --- a/00. Inbox/樹莓派/00. 樹莓派.canvas +++ b/00. Inbox/樹莓派/00. 樹莓派.canvas @@ -1,22 +1,24 @@ { "nodes":[ - {"id":"6c6ff5d0e7850ea8","type":"group","x":920,"y":-360,"width":960,"height":1300,"label":"Docker"}, - {"id":"e94c9e71b9aeaa89","type":"group","x":440,"y":-360,"width":400,"height":1100,"label":"設定"}, + {"id":"6c6ff5d0e7850ea8","type":"group","x":920,"y":-360,"width":940,"height":1100,"label":"Docker"}, + {"id":"e94c9e71b9aeaa89","type":"group","x":440,"y":-360,"width":400,"height":1100,"label":"基本設定"}, + {"id":"acb6cf6a8010bb24","type":"group","x":1940,"y":-360,"width":480,"height":349,"label":"備份設定"}, {"id":"d624199752cf24de","type":"text","text":"![[更新與安裝工具]]","x":460,"y":-340,"width":360,"height":120}, {"id":"bc030994aafc5a3b","type":"text","text":"![[bashrc]]","x":460,"y":-37,"width":360,"height":177}, {"id":"6875474760fafe7c","type":"text","text":"![[raspi-config]]","x":460,"y":-200,"width":360,"height":140}, {"id":"b77234a9cdf72aad","type":"text","text":"# 安裝 docker\n[[00. Inbox/Linux/Docker|Docker]]","x":940,"y":-340,"width":440,"height":120}, {"id":"f210470376a4829d","type":"text","text":"![[設定Cloudflare DDNS]]","x":460,"y":370,"width":360,"height":150}, {"id":"ef9431e16c90f57f","type":"text","text":"設定![[smb client]]","x":460,"y":540,"width":360,"height":180}, - {"id":"a63a5baed201beda","type":"text","text":"![[設定日誌大小]]","x":480,"y":160,"width":360,"height":180}, {"id":"6e59f6b9f36b24e2","type":"text","text":"![[安裝]]","x":-40,"y":132,"width":383,"height":177}, {"id":"d0711febf5985ed5","type":"text","text":"# 安裝nginx-certbot\n教學: [iT 邦幫忙::一起幫忙解決難題,拯救 IT 人的一天](https://ithelp.ithome.com.tw/m/articles/10301801\n\nGithub: [JonasAlfredsson/docker-nginx-certbot: Automatically create and renew website certificates for free using the Let's Encrypt certificate authority.](https://github.com/JonasAlfredsson/docker-nginx-certbot)","x":940,"y":-190,"width":440,"height":240}, {"id":"b900ad17a2841b99","type":"text","text":"# 安裝 Filebrowser\n[官方安裝流程](https://filebrowser.org/installation#docker)","x":1400,"y":-340,"width":440,"height":120}, {"id":"8cac63e48dff1f2a","type":"text","text":"# 安裝 Gitea\n官方教學:[Installation with Docker](https://docs.gitea.com/installation/install-with-docker)\n\n設定Gmail寄信:[Gitea 使用 Gmail 寄信 - 筆記ZONE](https://zonego.tw/2021/11/14/gitea-gmail/)\n","x":940,"y":80,"width":440,"height":140}, {"id":"94fa9ef036dbe62a","type":"text","text":"# Speedtest 測試\n超簡單命令:`docker run --rm robinmanuelthiel/speedtest:latest`\n\nGithub: [robinmanuelthiel/speedtest: Check internet bandwidth from a Docker container and save the results to an InfluxDB](https://github.com/robinmanuelthiel/speedtest)","x":940,"y":253,"width":440,"height":207}, {"id":"2a7d5efcc0f2dc0e","type":"text","text":"# 安裝 Portainer\n教學: [Portainer:一款圖形化容器管理工具|方格子 vocus](https://vocus.cc/article/643e9f74fd89780001b51739)\n\n官網:[Portainer: Container Management Software for Kubernetes and Docker](https://www.portainer.io/)","x":940,"y":489,"width":440,"height":191}, - {"id":"fc32cf264646fdec","type":"text","text":"# 安裝 Storj\n![[Storj]]","x":940,"y":720,"width":440,"height":200}, - {"id":"ff16e3814718d144","type":"text","text":"# 設定 crontab\n1. 用[[ddns.sh]]定時更新DNS\n2. 用[[backup_docker_gitea.sh]]備份 gitea docker\n3. 用[[backup_pi.sh]]備份整張SD卡","x":1400,"y":-190,"width":440,"height":150} + {"id":"94f3e389e2687b35","type":"text","text":"# 安裝 Watch Tower\n![[Watchtower#或使用 docke-compose.yml|docke-compose.yml]]","x":1400,"y":-190,"width":440,"height":322}, + {"id":"fc32cf264646fdec","type":"text","text":"# 安裝 Storj\n![[Storj]]","x":1400,"y":160,"width":440,"height":300}, + {"id":"a63a5baed201beda","type":"text","text":"![[設定日誌大小]]","x":460,"y":163,"width":360,"height":180}, + {"id":"ff16e3814718d144","type":"text","text":"# 設定 crontab\n1. 用[[ddns.sh]]定時更新DNS\n2. 用[[backup_docker_gitea.sh]]備份 gitea docker\n3. 用[[backup_pi.sh]]備份整張SD卡","x":1960,"y":-340,"width":440,"height":150} ], "edges":[ {"id":"9683c15c63c167c0","fromNode":"6e59f6b9f36b24e2","fromSide":"right","toNode":"e94c9e71b9aeaa89","toSide":"left"}, @@ -24,6 +26,7 @@ {"id":"feff628bc758f1e4","fromNode":"6875474760fafe7c","fromSide":"bottom","toNode":"bc030994aafc5a3b","toSide":"top"}, {"id":"f1a7af20d2d64873","fromNode":"bc030994aafc5a3b","fromSide":"bottom","toNode":"a63a5baed201beda","toSide":"top"}, {"id":"64bd8b56a86d56af","fromNode":"a63a5baed201beda","fromSide":"bottom","toNode":"f210470376a4829d","toSide":"top"}, - {"id":"28432d91108beecd","fromNode":"e94c9e71b9aeaa89","fromSide":"right","toNode":"6c6ff5d0e7850ea8","toSide":"left"} + {"id":"28432d91108beecd","fromNode":"e94c9e71b9aeaa89","fromSide":"right","toNode":"6c6ff5d0e7850ea8","toSide":"left"}, + {"id":"999cc182541e11a4","fromNode":"6c6ff5d0e7850ea8","fromSide":"right","toNode":"acb6cf6a8010bb24","toSide":"left"} ] } \ No newline at end of file diff --git a/00. Inbox/樹莓派/Watchtower.md b/00. Inbox/樹莓派/Watchtower.md index 8a0a955..df03435 100644 --- a/00. Inbox/樹莓派/Watchtower.md +++ b/00. Inbox/樹莓派/Watchtower.md @@ -22,6 +22,18 @@ docker run -d \ --cleanup ``` +### 或使用 docke-compose.yml +```yml +version: "3" +services: + watchtower: + image: containrrr/watchtower + restart: always + volumes: + - /var/run/docker.sock:/var/run/docker.sock + command: --interval 86400 --cleanup +``` + ### 設置自動更新檢測頻率 Watchtower 默認是每 5min 檢測一次,如果需要更改週期,可以使用 `--interval`、`-i` 選項 如設定每小時檢測一次: