# Afegir al docker-compose.yml de Nextcloud # /opt/stacks/nextcloud/docker-compose.yml services: # ... (db, redis, nextcloud, cron ja existents) ... # ── OnlyOffice Document Server ─────────── onlyoffice: container_name: onlyoffice image: onlyoffice/documentserver:latest restart: unless-stopped environment: TZ: Europe/Madrid # JWT — ha de coincidir EXACTAMENT amb el plugin de Nextcloud JWT_ENABLED: "true" JWT_SECRET: '${ONLYOFFICE_JWT_SECRET}' JWT_HEADER: Authorization # Valor per defecte oficial (no AuthorizationJwt) ports: - "8082:80" # Només local → via Nginx Proxy Manager volumes: - oo_data:/var/www/onlyoffice/Data # Certificats i configuració - oo_logs:/var/log/onlyoffice # Logs - oo_cache:/var/lib/onlyoffice # Cache de fitxers (OBLIGATORI!) healthcheck: test: ["CMD", "curl", "-f", "http://localhost/healthcheck"] interval: 30s timeout: 10s retries: 5 start_period: 60s # OnlyOffice triga a arrencar la 1a vegada networks: [nc_net, shared_net] # Afegir als volumes existents: volumes: # ... (nc_db, nc_html, nc_data ja existents) ... oo_data: oo_logs: oo_cache: # Nou — cache de fitxers # networks ja definides al compose de Nextcloud