OS 環境:Ubuntu 22.04 並安裝 Docker (本篇架設服務皆只使用同一台主機) DNS 網域名稱:nc2.domain.com.tw 和 collabora.domain.com.tw IP:10.1.1.1 下載官方 yml 格式 # mkdir nextcloud # cd nextcloud # curl -f -L https://github.com/nextcloud/docker/raw/master/stack.yml -o docker-compose.yml 修改內文如下: version: '3.2' services: db: image: mariadb:10.6 restart: always volumes: - db:/var/lib/mysql environment: - MYSQL_ROOT_PASSWORD=123456 - MYSQL_PASSWORD=123456 - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud redis: image: redis:alpine restart: always app: # image: nextcloud image: nextcloud:27.1.5 restart: always ports: - 8080:80 volumes: - nextcloud:/var/www/html environment: - REDIS_HOST=redis - MYSQL_PASSWORD=123456 - MYSQL_DATABASE=nextcloud - MYSQL_USER=nextcloud - MYSQL_HOST=db depends_on: - db - redis cron: # image: nextcloud image: nextcloud:27.1.5 restart: always