version: '3'

services:

  db:

    image: mariadb:10.5

    container_name: nextcloud-db

    restart: always

    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW

    volumes:

      - /data/mariadb/db:/var/lib/mysql

    environment:

      - MYSQL_DATABASE=nextcloud

      - MYSQL_ROOT_PASSWORD=loveff.22

      - MYSQL_USER=nextcloud

      - MYSQL_PASSWORD=boge14@Level5



  redis:

    image: redis:alpine

    container_name: nextcloud_redis

    restart: always

    expose:

      - 6379



  cron:

       image: nextcloud:27.0.1-apache

       restart: always

       volumes:

        - /data/nextcloud/cron:/var/www/html

       entrypoint: /cron.sh

       depends_on:

        - db

        - redis



  nextcloud:

    image: nextcloud:27.0.1-apache

    container_name: nextcloud_web

    restart: always

    volumes:

      - /data/nextcloud:/var/www/html

    environment:

      - NEXTCLOUD_ADMIN_USER=zeaslity

      - NEXTCLOUD_ADMIN_PASSWORD=loveff.22

      - NEXTCLOUD_TRUSTED_DOMAINS='nc.107421.xyz'

      - REDIS_HOST=redis

      - VIRTUAL_HOST=nc.107421.xyz

      - TZ=Aisa/Shanghai

      - MYSQL_DATABASE=nextcloud

      - MYSQL_ROOT_PASSWORD=loveff.22

      - MYSQL_USER=nextcloud

      - MYSQL_PASSWORD=boge14@Level5

      - MYSQL_HOST=db

      - UID=0

      - GID=0

      - UPLOAD_MAX_SIZE=10240M

      - APC_SHM_SIZE=8192M

      - OPCACHE_MEM_SIZE=5120

      - CRON_PERIOD=15m

      - PHP_UPLOAD_LIMIT=5120M

      - PHP_MEMORY_LIMIT=5120M


    depends_on:

      - db

      - redis

    links:

      - db

    cap_add:

      - MKNOD

    ports:
      - 8080:80

  cloud_collabora:
    image: collabora/code:23.05.2.2.1
    container_name: cloud_collabora
    environment:
      - aliasgroup2=https://office.107421.xyz:443
      - servername=office.107421.xyz
      - username=zeaslity
      - password=lovemm.23
      - dictionaries=en_US zh_CN
    cap_add:
      - MKNOD
    ports:
      - 9980:9980
    restart: always
    volumes:
      - ./collabora/coolwsd.xml:/etc/coolwsd/coolwsd.xml


# https://blog.csdn.net/u013568040/article/details/123648666