services: nextcloud: image: nextcloud:30-apache container_name: nextcloud restart: unless-stopped depends_on: postgres: condition: service_healthy environment: - POSTGRES_HOST=postgres - POSTGRES_DB=nextcloud - POSTGRES_USER=nextcloud - POSTGRES_PASSWORD=${NEXTCLOUD_DB_PASSWORD} - NEXTCLOUD_ADMIN_USER=${NEXTCLOUD_ADMIN_USER:-admin} - NEXTCLOUD_ADMIN_PASSWORD=${NEXTCLOUD_ADMIN_PASSWORD} - NEXTCLOUD_TRUSTED_DOMAINS=${NEXTCLOUD_DOMAIN:-nextcloud.local} # Reverse proxy Caddy (VPS -> WireGuard -> gateway 192.168.1.254) - NEXTCLOUD_TRUSTED_PROXIES=192.168.1.254 - OVERWRITEPROTOCOL=https - OVERWRITECLIURL=https://${NEXTCLOUD_DOMAIN:-nextcloud.local} ports: - "8080:80" volumes: # Donnees utilisateur sur le QNAP via NFS - /mnt/nas/nextcloud-data:/var/www/html/data # Config locale pour la performance - nextcloud-app:/var/www/html postgres: image: postgres:16-alpine container_name: nextcloud-db restart: unless-stopped environment: - POSTGRES_DB=nextcloud - POSTGRES_USER=nextcloud - POSTGRES_PASSWORD=${NEXTCLOUD_DB_PASSWORD} volumes: - ./postgres:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U nextcloud"] interval: 10s timeout: 5s retries: 5 volumes: nextcloud-app: