Aggiunto syncthing

This commit is contained in:
miracle091 2021-05-17 11:55:03 +02:00
parent 5589f5ee19
commit 454816506e
4 changed files with 134 additions and 0 deletions

View File

@ -6,6 +6,7 @@
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/youtubedl.png" width="28" /> [metube](metube/) - frontend per youtube-dl
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/miniflux.png" width="28" /> [miniflux](miniflux/) - feed rss minimale
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/navidrome.png" width="28" /> [navidrome](navidrome/) - simil-spotify personale
* <img src="https://raw.githubusercontent.com/NX211/homer-icons/master/syncthing.png" width="28" /> [syncthing](syncthing/) - simil-dropbox decentralizzato
* <img src="https://raw.githubusercontent.com/containrrr/watchtower/main/logo.png" width="28" /> [watchotwer](watchtower/) - monitor per aggiornamenti
* altri in arrivo, stay tuned™

10
syncthing/.env Normal file
View File

@ -0,0 +1,10 @@
# Generale
SYNCTHING_CONFIG=/home/docker/syncthing/config
SYNCTHING_DATA=/home/docker/syncthing/data
SYNCTHING_WEBUI_PORT=8384
SYNCTHING_LST_TCP=22000/tcp
SYNCTHING_LST_UDP=22000/udp
SYNCTHING_PORT_DSC=21027/udp
# Syncthing
TZ=Europe/Amsterdam

106
syncthing/README.md Normal file
View File

@ -0,0 +1,106 @@
# Syncthing in docker
<div align="center">
<img src="https://syncthing.net/img/screenshot.png" />
</div>
# Descrizione
* [Sito ufficiale](https://syncthing.net/)
* [Repo (Github)](https://github.com/linuxserver/docker-syncthing)
Syncthing è un simil-dropbox decentralizzato, sicuro e privato:
- Scritto in Go (Golang)
- Multipiattaforma (Linux, macOS, Windows, ARM e PowerPC)
- Praticamente un dropbox ma decentralizzato e senza limiti di spazio/banda
# Struttura file e cartelle
```
/home/
└── ~/
└── docker/
└── syncthing/
├── config/
├── data/
├── .env
└── docker-compose.yml
```
* `config/` - la cartella dove risiedono i dati che servono a syncthing
* `data/` - la cartella dove vengono condivisi i dati presenti
* `.env` - un file contenenti le variabili environment per il docker compose
* `docker-compose.yml` - il docker compose per creare il container
Tutti i file e le cartelle devono essere creati a mano.</br>
# docker-compose
`docker-compose.yml`
```yml
version: "3"
services:
syncthing:
container_name: linuxserver-syncthing
image: ghcr.io/linuxserver/syncthing
restart: unless-stopped
ports:
- ${SYNCTHING_WEBUI_PORT:-8384}:8384
- ${SYNCTHING_LST_TCP:-22000/tcp}:22000/tcp
- ${SYNCTHING_LST_UDP:-22000/udp}:22000/udp
- ${SYNCTHING_PORT_DSC:-21027/udp}:21027/udp
env_file: .env
sysctls:
- net.core.rmem_max=2097152
volumes:
- ${SYNCTHING_CONFIG:-/home/docker/syncthing/config}:/config
- ${SYNCTHING_DATA:-/home/docker/syncthing/data}:/data
```
`.env`
```bash
# Generale
SYNCTHING_CONFIG=/home/docker/syncthing/config
SYNCTHING_DATA=/home/docker/syncthing/data
SYNCTHING_WEBUI_PORT=8384
SYNCTHING_LST_TCP=22000/tcp
SYNCTHING_LST_UDP=22000/udp
SYNCTHING_PORT_DSC=21027/udp
# Syncthing
TZ=Europe/Amsterdam
```
# Reverse proxy
Ancora non ho previsto l'uso di un reverse proxy. (Vedi [Todo](#Todo))
# Aggiornamenti
[Watchtower](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/watchtower) aggiorna l'immagine automaticamente.
Aggiornamento manuale:
- `docker-compose pull`</br>
- `docker-compose up -d`</br>
- `docker image prune`
# Backup e ripristino
#### Backup
Copiare a mano, tramite crontab o altro la cartella `syncthing` (Vedi [Todo](#Todo))
#### Ripristino
* spegnere il container `docker-compose down`</br>
* cancellare l'intera cartella `syncthing`</br>
* dal backup copiare la cartella `syncthing`</br>
* far partire il container `docker-compose up -d`
# Todo
Implementare:
- reverse proxy: **[caddy](https://caddyserver.com/) o [traefik](https://doc.traefik.io/traefik/).**
- backup: **[borg](https://github.com/DoTheEvo/selfhosted-apps-docker/tree/master/borg_backup) per fare i backup giornalieri completi.**

View File

@ -0,0 +1,17 @@
version: "3"
services:
syncthing:
container_name: linuxserver-syncthing
image: ghcr.io/linuxserver/syncthing
restart: unless-stopped
ports:
- ${SYNCTHING_WEBUI_PORT:-8384}:8384
- ${SYNCTHING_LST_TCP:-22000/tcp}:22000/tcp
- ${SYNCTHING_LST_UDP:-22000/udp}:22000/udp
- ${SYNCTHING_PORT_DSC:-21027/udp}:21027/udp
env_file: .env
sysctls:
- net.core.rmem_max=2097152
volumes:
- ${SYNCTHING_CONFIG:-/home/docker/syncthing/config}:/config
- ${SYNCTHING_DATA:-/home/docker/syncthing/data}:/data