Files
self-hosted-docker-setups/nextcloud/docker-compose.yml
2021-09-15 09:33:22 -05:00

69 lines
2.3 KiB
YAML

version: '2'
volumes:
nextcloud:
db:
services:
db:
image: arm64v8/mariadb:10.5
container_name: nextcloud_db
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
restart: always
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=<secure-root-password> # Change this
- MYSQL_PASSWORD=<password> # Change this
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
redis:
image: redis:alpine
container_name: nextcloud_redis
#command: redis-server --requirepass <secure-password>
restart: always
app:
image: nextcloud
container_name: nextcloud_app
ports:
- 8088:80 # Serving on port 8088, change if you'd like a different port
volumes:
- /mnt/nfs-share/Nextcloud:/var/www/html # Change this to where you would like Nextcloud data (preferably external storage)
environment:
- MYSQL_HOST=db
- MYSQL_PASSWORD=<password> # Change this (same as defined in `db`)
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- REDIS_HOST=redis
#- REDIS_HOST_PASSWORD=<secure-password>
- NEXTCLOUD_ADMIN_USER=ncadmin # Change this
- NEXTCLOUD_ADMIN_PASSWORD=<admin-password> # Change this
- NEXTCLOUD_HOSTNAME=cloud.example.com # Change this
- SMTP_HOST=smtp.gmail.com # Using gmail's smtp server for emails
- SMTP_SECURE=tls
- SMTP_PORT=587
- SMTP_AUTHTYPE=LOGIN
- SMTP_NAME=<gmail-user> # Change this
- SMTP_PASSWORD=<gmail-password> # Change this
- MAIL_FROM_ADDRESS=<gmail-address> # Change this
- MAIL_DOMAIN=gmail.com
restart: always
depends_on:
- db
- redis
cron:
image: nextcloud
container_name: nextcloud_cron
restart: always
volumes:
- /mnt/nfs-share/Nextcloud:/var/www/html # Point to nextcloud data directory
entrypoint: /cron.sh
depends_on:
- db
- redis