Primo caricamento

This commit is contained in:
Francesco Picone
2025-12-19 16:25:05 +01:00
commit 7457865d26
4 changed files with 88 additions and 0 deletions

15
.env.example Normal file
View File

@@ -0,0 +1,15 @@
# User and Group ID
PUID=1000
PGID=1000
# Ports
WEB_UI_PORT=8384
SYNC_PORT=22000
DISCOVERY_PORT=21027
# Volume Paths (modifica questi percorsi secondo le tue esigenze)
# Percorso per la configurazione di Syncthing
CONFIG_PATH=./syncthing/config
# Percorso per i dati sincronizzati
DATA_PATH=./syncthing/data

5
.gitignore vendored Normal file
View File

@@ -0,0 +1,5 @@
# File di ambiente con dati sensibili
.env
# Cartelle di Syncthing
syncthing/

43
README.md Normal file
View File

@@ -0,0 +1,43 @@
# Syncthing Docker Setup
Setup Docker per Syncthing con configurazione tramite file .env.
## Configurazione
1. Modifica il file `.env` e imposta i percorsi delle cartelle per i dati e la configurazione:
- `DATA_PATH`: cartella fisica dove verranno mappati i file sincronizzati
- `CONFIG_PATH`: cartella per la configurazione di Syncthing
2. (Opzionale) Modifica `PUID` e `PGID` per corrispondere al tuo utente Linux
3. (Opzionale) Modifica le porte se necessario
## Avvio
```bash
docker-compose up -d
```
## Accesso
Accedi all'interfaccia web di Syncthing all'indirizzo:
```
http://localhost:8384
```
## Stop
```bash
docker-compose down
```
## Porte utilizzate
- `8384`: Interfaccia web (HTTP)
- `22000`: Trasferimento file (TCP/UDP)
- `21027`: Local discovery (UDP)
## Volumi
- `/var/syncthing/config`: Configurazione di Syncthing
- `/var/syncthing/data`: Dati sincronizzati

25
docker-compose.yml Normal file
View File

@@ -0,0 +1,25 @@
version: '3.8'
services:
syncthing:
image: syncthing/syncthing:latest
container_name: syncthing
hostname: syncthing
environment:
- PUID=${PUID}
- PGID=${PGID}
volumes:
- ${CONFIG_PATH}:/var/syncthing/config
- ${DATA_PATH}:/var/syncthing/data
ports:
- ${WEB_UI_PORT}:8384 # Web UI
- ${SYNC_PORT}:22000/tcp # TCP file transfers
- ${SYNC_PORT}:22000/udp # QUIC file transfers
- ${DISCOVERY_PORT}:21027/udp # Local discovery
restart: unless-stopped
networks:
- syncthing_network
networks:
syncthing_network:
driver: bridge