++ Inserimento possibilità di edit file
This commit is contained in:
26
.env.example
26
.env.example
@@ -1,12 +1,26 @@
|
|||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
# Configurazione ONLYOFFICE + Cloudflare Tunnel
|
# Configurazione Nextcloud + ONLYOFFICE + Cloudflare
|
||||||
# Rinomina questo file in .env prima di avviare
|
# Rinomina in .env e compila tutti i valori
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
|
|
||||||
# Token del tunnel Cloudflare (prendilo dal dashboard Zero Trust)
|
# ── Cloudflare Tunnel ──────────────────────────
|
||||||
# ATTENZIONE: non condividere mai questo valore pubblicamente
|
# Token del tunnel (rigeneralo se già esposto pubblicamente)
|
||||||
CLOUDFLARE_TOKEN=il_tuo_token_qui
|
CLOUDFLARE_TOKEN=il_tuo_token_cloudflare
|
||||||
|
|
||||||
# Chiave JWT per proteggere l'accesso all'API di ONLYOFFICE
|
# ── Nextcloud ─────────────────────────────────
|
||||||
|
# Dominio pubblico configurato nel tunnel Cloudflare
|
||||||
|
NC_DOMAIN=cloud.tuodominio.com
|
||||||
|
|
||||||
|
# Credenziali account amministratore Nextcloud
|
||||||
|
NC_ADMIN_USER=admin
|
||||||
|
NC_ADMIN_PASSWORD=cambia_questa_password
|
||||||
|
|
||||||
|
# ── Database MariaDB ───────────────────────────
|
||||||
|
DB_NAME=nextcloud
|
||||||
|
DB_USER=nextcloud
|
||||||
|
DB_PASSWORD=cambia_password_db
|
||||||
|
DB_ROOT_PASSWORD=cambia_password_root_db
|
||||||
|
|
||||||
|
# ── ONLYOFFICE JWT ─────────────────────────────
|
||||||
# Genera con: openssl rand -hex 32
|
# Genera con: openssl rand -hex 32
|
||||||
JWT_SECRET=cambia_con_stringa_casuale_sicura
|
JWT_SECRET=cambia_con_stringa_casuale_sicura
|
||||||
|
|||||||
@@ -1,8 +1,76 @@
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
# ONLYOFFICE Document Server (modalità lite)
|
# Nextcloud — sync & share + editor web
|
||||||
# Usa SQLite + memoria interna, niente PostgreSQL/RabbitMQ
|
# ─────────────────────────────────────────────
|
||||||
|
nextcloud:
|
||||||
|
image: nextcloud:28-apache
|
||||||
|
container_name: nextcloud
|
||||||
|
restart: unless-stopped
|
||||||
|
depends_on:
|
||||||
|
- nextcloud-db
|
||||||
|
- nextcloud-redis
|
||||||
|
environment:
|
||||||
|
NEXTCLOUD_ADMIN_USER: ${NC_ADMIN_USER}
|
||||||
|
NEXTCLOUD_ADMIN_PASSWORD: ${NC_ADMIN_PASSWORD}
|
||||||
|
NEXTCLOUD_TRUSTED_DOMAINS: ${NC_DOMAIN}
|
||||||
|
MYSQL_HOST: nextcloud-db
|
||||||
|
MYSQL_DATABASE: ${DB_NAME}
|
||||||
|
MYSQL_USER: ${DB_USER}
|
||||||
|
MYSQL_PASSWORD: ${DB_PASSWORD}
|
||||||
|
REDIS_HOST: nextcloud-redis
|
||||||
|
# Necessario per funzionare dietro Cloudflare Tunnel
|
||||||
|
OVERWRITEPROTOCOL: https
|
||||||
|
OVERWRITECLIURL: https://${NC_DOMAIN}
|
||||||
|
volumes:
|
||||||
|
- nextcloud_html:/var/www/html
|
||||||
|
- nextcloud_data:/var/www/html/data
|
||||||
|
expose:
|
||||||
|
- "80"
|
||||||
|
mem_limit: 512m
|
||||||
|
mem_reservation: 256m
|
||||||
|
cpus: "0.75"
|
||||||
|
networks:
|
||||||
|
- office_net
|
||||||
|
|
||||||
|
# ─────────────────────────────────────────────
|
||||||
|
# MariaDB — database per Nextcloud (più leggero di PostgreSQL)
|
||||||
|
# ─────────────────────────────────────────────
|
||||||
|
nextcloud-db:
|
||||||
|
image: mariadb:11-ubi
|
||||||
|
container_name: nextcloud-db
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
||||||
|
MYSQL_DATABASE: ${DB_NAME}
|
||||||
|
MYSQL_USER: ${DB_USER}
|
||||||
|
MYSQL_PASSWORD: ${DB_PASSWORD}
|
||||||
|
volumes:
|
||||||
|
- nextcloud_db:/var/lib/mysql
|
||||||
|
expose:
|
||||||
|
- "3306"
|
||||||
|
mem_limit: 256m
|
||||||
|
mem_reservation: 128m
|
||||||
|
cpus: "0.25"
|
||||||
|
networks:
|
||||||
|
- office_net
|
||||||
|
|
||||||
|
# ─────────────────────────────────────────────
|
||||||
|
# Redis — cache per Nextcloud (velocizza molto)
|
||||||
|
# ─────────────────────────────────────────────
|
||||||
|
nextcloud-redis:
|
||||||
|
image: redis:7-alpine
|
||||||
|
container_name: nextcloud-redis
|
||||||
|
restart: unless-stopped
|
||||||
|
command: redis-server --save "" --appendonly no --maxmemory 64mb --maxmemory-policy allkeys-lru
|
||||||
|
mem_limit: 80m
|
||||||
|
mem_reservation: 32m
|
||||||
|
cpus: "0.10"
|
||||||
|
networks:
|
||||||
|
- office_net
|
||||||
|
|
||||||
|
# ─────────────────────────────────────────────
|
||||||
|
# ONLYOFFICE Document Server
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
onlyoffice:
|
onlyoffice:
|
||||||
image: onlyoffice/documentserver:latest
|
image: onlyoffice/documentserver:latest
|
||||||
@@ -18,7 +86,6 @@ services:
|
|||||||
- onlyoffice_lib:/var/lib/onlyoffice
|
- onlyoffice_lib:/var/lib/onlyoffice
|
||||||
expose:
|
expose:
|
||||||
- "80"
|
- "80"
|
||||||
# Limiti risorse — adatta in base alla RAM disponibile
|
|
||||||
mem_limit: 1g
|
mem_limit: 1g
|
||||||
mem_reservation: 512m
|
mem_reservation: 512m
|
||||||
cpus: "1.0"
|
cpus: "1.0"
|
||||||
@@ -26,8 +93,10 @@ services:
|
|||||||
- office_net
|
- office_net
|
||||||
|
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
# Cloudflare Tunnel — nessuna porta esposta
|
# Cloudflare Tunnel
|
||||||
# Instrada il traffico da Cloudflare → onlyoffice:80
|
# Espone SOLO Nextcloud (porta 80) verso l'esterno.
|
||||||
|
# ONLYOFFICE è raggiungibile internamente da Nextcloud
|
||||||
|
# tramite http://onlyoffice:80
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
cloudflared:
|
cloudflared:
|
||||||
image: cloudflare/cloudflared:latest
|
image: cloudflare/cloudflared:latest
|
||||||
@@ -38,6 +107,7 @@ services:
|
|||||||
mem_reservation: 64m
|
mem_reservation: 64m
|
||||||
cpus: "0.25"
|
cpus: "0.25"
|
||||||
depends_on:
|
depends_on:
|
||||||
|
- nextcloud
|
||||||
- onlyoffice
|
- onlyoffice
|
||||||
networks:
|
networks:
|
||||||
- office_net
|
- office_net
|
||||||
@@ -46,6 +116,9 @@ services:
|
|||||||
# Volumi persistenti
|
# Volumi persistenti
|
||||||
# ─────────────────────────────────────────────
|
# ─────────────────────────────────────────────
|
||||||
volumes:
|
volumes:
|
||||||
|
nextcloud_html:
|
||||||
|
nextcloud_data:
|
||||||
|
nextcloud_db:
|
||||||
onlyoffice_data:
|
onlyoffice_data:
|
||||||
onlyoffice_logs:
|
onlyoffice_logs:
|
||||||
onlyoffice_lib:
|
onlyoffice_lib:
|
||||||
|
|||||||
Reference in New Issue
Block a user