78e1c37a9e
- Aggiunge limiti di memoria, CPU e swap al container per prevenire crash dell'host su SBC (la causa principale era log illimitati + OOM senza cgroup) - Aggiunge rotazione log (max 30 MB totali) per evitare riempimento SD card - Aggiunge health check con riavvio automatico in caso di blocco Node.js - Monta /tmp come tmpfs per ridurre scritture sulla SD card - Pinna l'immagine a 15.2.2 invece di latest - Semplifica README: unico metodo per generare la password, guida passo-passo - Aggiunge variabili opzionali WG_MEM_LIMIT / WG_MEMSWAP_LIMIT / WG_CPUS in .env.example Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
41 lines
1.3 KiB
Bash
41 lines
1.3 KiB
Bash
# ============================================================
|
|
# WireGuard VPN — Configurazione locale
|
|
# Copia .env.example in .env e compila i valori richiesti.
|
|
# ============================================================
|
|
|
|
# --- OBBLIGATORI ---
|
|
|
|
# IP pubblico o hostname DDNS del server (es. mio-host.duckdns.org)
|
|
WG_HOST=your-ddns-hostname.example.com
|
|
|
|
# Hash bcrypt della password per la web UI.
|
|
# Vedi README.md per come generarlo.
|
|
# ATTENZIONE: incolla il valore esatto, senza aggiungere $$ o escape.
|
|
PASSWORD_HASH=$2a$12$replacethiswithyourrealbcrypthash
|
|
|
|
# Fuso orario (formato IANA)
|
|
# Lista completa: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
TZ=Europe/Rome
|
|
|
|
# --- OPZIONALI (valori di default mostrati) ---
|
|
|
|
# Porta UDP WireGuard
|
|
WG_PORT=51820
|
|
|
|
# Porta TCP interfaccia web
|
|
WG_UI_PORT=51821
|
|
|
|
# DNS inviati ai client
|
|
WG_DEFAULT_DNS=1.1.1.1,8.8.8.8
|
|
|
|
# --- OPZIONALI — Limiti risorse container (SBC) ---
|
|
# Decommenta e adatta alla RAM disponibile:
|
|
# 512 MB RAM → WG_MEM_LIMIT=128m
|
|
# 1 GB RAM → WG_MEM_LIMIT=256m (default)
|
|
# 2 GB+ RAM → WG_MEM_LIMIT=384m
|
|
# Tenere WG_MEMSWAP_LIMIT = WG_MEM_LIMIT per disabilitare lo swap del container.
|
|
# Su single-core (Pi Zero / Pi 1) impostare WG_CPUS=0.75.
|
|
# WG_MEM_LIMIT=256m
|
|
# WG_MEMSWAP_LIMIT=256m
|
|
# WG_CPUS=1.0
|