volumes: nc-data: db-data: networks: reverse_proxy-tier: external: true nextcloud: external: false services: # NextCloud nextcloud: build: ./images/nc restart: always volumes: - nc-data:/var/www/html - type: tmpfs target: /tmp:exec environment: - TRUSTED_PROXIES=172.16.0.0/12 192.168.0.0/16 10.0.0.0/8 fc00::/7 fe80::/10 2001:db8::/32 - NEXTCLOUD_TRUSTED_DOMAINS=${DOMAIN_NAME:?} - OVERWRITEPROTOCOL=https - OVERWRITECLIURL=https://${DOMAIN_NAME} # - VIRTUAL_PROTO=fastcgi # - VIRTUAL_ROOT=xxx - POSTGRES_HOST=db - REDIS_HOST=redis - PHP_MEMORY_LIMIT=3G - PHP_UPLOAD_LIMIT=3G env_file: - db.env - nc_config.env networks: - nextcloud depends_on: - db - redis # janitor janitor: build: ./images/nc restart: always volumes: - nc-data:/var/www/html - type: tmpfs target: /tmp:exec entrypoint: /cron.sh networks: - nextcloud depends_on: - db - redis # Frontend php proxy front: build: ./images/ngx restart: always environment: - VIRTUAL_HOST=${DOMAIN_NAME} - LETSENCRYPT_HOST=${DOMAIN_NAME} volumes: - nc-data:/var/www/html:ro depends_on: - nextcloud networks: - nextcloud - reverse_proxy-tier # db db: image: postgres:17-alpine restart: always volumes: - db-data:/var/lib/postgresql/data env_file: - db.env shm_size: 512MB networks: - nextcloud # redis redis: image: redis:alpine restart: always networks: - nextcloud # Collabora CODE collabora: image: collabora/code restart: always privileged: true hostname: ${COLLABORA_DOMAIN_NAME:-collabora.${DOMAIN_NAME}} environment: - VIRTUAL_HOST=${COLLABORA_DOMAIN_NAME:-collabora.${DOMAIN_NAME}} - VIRTUAL_PORT=9980 - VIRTUAL_PROTO=https - LETSENCRYPT_HOST=${COLLABORA_DOMAIN_NAME:-collabora.${DOMAIN_NAME}} - server_name=${COLLABORA_DOMAIN_NAME:-collabora.${DOMAIN_NAME}} - aliasgroup1=https://${DOMAIN_NAME} networks: - reverse_proxy-tier - nextcloud volumes: - type: tmpfs target: /tmp:exec