当前位置: 代码迷 >> 综合 >> Docker compose 安装nextcloud yaml 文件示例
  详细解决方案

Docker compose 安装nextcloud yaml 文件示例

热度:96   发布时间:2023-09-21 17:09:53.0

docker以yaml方式安装nextcloud示例: 

version: '3'networks:nextcloud_network:external: falseservices:nextcloud:image: wonderfall/nextclouddepends_on:- nextcloud-db           # If using MySQL- redis                  # If using Redisenvironment:- UID=1000- GID=1000- UPLOAD_MAX_SIZE=20G- APC_SHM_SIZE=512M- OPCACHE_MEM_SIZE=256- CRON_PERIOD=15m- TZ=Asia/Shanghai- DOMAIN=localhost- DB_TYPE=mysql- DB_NAME=nextclouddocker- DB_USER=fan- DB_PASSWORD=fjh950107- DB_HOST=nextcloud-dbvolumes:- /share/CACHEDEV1_DATA/Container/nextcloud/data:/data- /share/CACHEDEV1_DATA/Container/nextcloud/config:/config- /share/CACHEDEV1_DATA/Container/nextcloud/apps:/apps2- /share/CACHEDEV1_DATA/Container/nextcloud/themes:/nextcloud/themesnetworks:- nextcloud_network# If using MySQLnextcloud-db:image: mariadbvolumes:- /share/CACHEDEV1_DATA/Container/nextcloud/mariadb:/var/lib/mysqlenvironment:- MYSQL_ROOT_PASSWORD=123456- MYSQL_DATABASE=nextclouddocker- MYSQL_USER=admin- MYSQL_PASSWORD=123456networks:- nextcloud_network# If using Redisredis:image: redis:alpinecontainer_name: redisvolumes:- /share/CACHEDEV1_DATA/Container/nextcloud/redis:/datanetworks:- nextcloud_network

 

 

还有一位外国大佬分享的yaml

version: '3' services:proxy:image: jwilder/nginx-proxy:alpinelabels:- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true"container_name: nextcloud-proxynetworks:- nextcloud_networkports:- 80:80- 443:443volumes:- ./proxy/conf.d:/etc/nginx/conf.d:rw- ./proxy/vhost.d:/etc/nginx/vhost.d:rw- ./proxy/html:/usr/share/nginx/html:rw- ./proxy/certs:/etc/nginx/certs:ro- /etc/localtime:/etc/localtime:ro- /var/run/docker.sock:/tmp/docker.sock:rorestart: unless-stoppedletsencrypt:image: jrcs/letsencrypt-nginx-proxy-companioncontainer_name: nextcloud-letsencryptdepends_on:- proxynetworks:- nextcloud_networkvolumes:- ./proxy/certs:/etc/nginx/certs:rw- ./proxy/vhost.d:/etc/nginx/vhost.d:rw- ./proxy/html:/usr/share/nginx/html:rw- /etc/localtime:/etc/localtime:ro- /var/run/docker.sock:/var/run/docker.sock:rorestart: unless-stoppeddb:image: mariadbcontainer_name: nextcloud-mariadbnetworks:- nextcloud_networkvolumes:- db:/var/lib/mysql- /etc/localtime:/etc/localtime:roenvironment:- MYSQL_ROOT_PASSWORD=toor- MYSQL_PASSWORD=mysql- MYSQL_DATABASE=nextcloud- MYSQL_USER=nextcloudrestart: unless-stoppedapp:image: nextcloud:latestcontainer_name: nextcloud-appnetworks:- nextcloud_networkdepends_on:- letsencrypt- proxy- dbvolumes:- nextcloud:/var/www/html- ./app/config:/var/www/html/config- ./app/custom_apps:/var/www/html/custom_apps- ./app/data:/var/www/html/data- ./app/themes:/var/www/html/themes- /etc/localtime:/etc/localtime:roenvironment:- VIRTUAL_HOST=nextcloud.YOUR-DOMAIN- LETSENCRYPT_HOST=nextcloud.YOUR-DOMAIN- LETSENCRYPT_EMAIL=YOUR-EMAILrestart: unless-stoppedvolumes:nextcloud:db:networks:nextcloud_network:

 

最后参考另一位博主的方法:

https://blog.csdn.net/flyhorstar/article/details/87603260?utm_medium=distribute.pc_relevant.none-task-blog-baidujs_title-3&spm=1001.2101.3001.4242

 

 

 

  相关解决方案