env-docker/Config/Nextcloud/docker-compose.micro.yml
Chad 1ef1903f6b
Major Enhancements (#20)
* Fix program for html websites, need to handle errors for non-local sites though.

* Add message that the main program is starting since node-modules does not show anything.

* Go ahead and give DB a bump.

* Fix warning in DB log and NC not having enough power sometimes.

* Fix errors in DB log.

* This command uses the root account, not nextcloud.

* Add example CRON file.

* Specify that the host network should be used.

* Specify that the host network should be used.

* Recommend daily reset of the photos library.

* Add another package the container is missing.

* Add a backup script for the project directory.

* Fix a typo.

* Improve example file and add the backup job.

* Add an example of pulling the backup file.

* Give the zip a temporary filename while being built.

* Always get the full path, relative path does not work well when not in `.`.

* Remove extra newline.

* Prevent doing large uploads on a micro Nextcloud instance.

* Change how bz2 gets installed.

* More trying to fix the annoying bz2 warning.

* Remove "bad" package.

* Use a temporary filename during transfer.

* Bump CPUs up just a bit more for Nextcloud to avoid sync errors.

* Be more explicit with instructions.
2024-01-30 06:11:32 -07:00

104 lines
2.7 KiB
YAML

# Nextcloud configuration.
# This is a revised version of the original work here:
# https://hub.docker.com/_/nextcloud
# Changelog:
# 2023-07-16
# Change from mariadb:10.5 to 10.6.
# 2023-08-20
# Add Redis. (https://markontech.com/docker/setup-nextcloud-with-redis-using-docker/)
# 2023-08-21
# Got NC to work with OO after specifying the Advanced parameters!
# 2023-08-26
# Try combining OnlyOffice to here again. It has been on its own since
# 2023-07-25 but isn't being used for anything else. OO is slow to respond
# and upgrades can no longer be done separately but this keeps it all easier
# to maintain and may allow the internal address to be based on container
# name instead of the docker hosts's IP.
# 2024-01-23
# Experimenting with how small a Nextcloud installation can survive.
version: '3'
services:
## MariaDB ##
nc-db:
container_name: nc-db
image: mariadb:10.6
restart: always
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
volumes:
- ../../Volumes/Nextcloud/mariadb:/var/lib/mysql
environment:
- MYSQL_DATABASE=$MYSQL_DATABASE
- MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
- MYSQL_USER=$MYSQL_USER
- MYSQL_PASSWORD=$MYSQL_PASSWORD
deploy:
mode: global
resources:
limits:
cpus: '0.20'
memory: 256M
## Redis ##
nc-redis:
container_name: nc-redis
image: redis
restart: always
command: redis-server --requirepass $REDIS_HOST_PASSWORD
deploy:
mode: global
resources:
limits:
cpus: '0.10'
memory: 32M
### OnlyOffice ##
##nc-oo:
## container_name: nc-oo
## image: onlyoffice/documentserver
## restart: always
## ports:
## - 8081:80
## environment:
## - JWT_SECRET=$JWT_SECRET
## deploy:
## mode: global
## resources:
## limits:
## cpus: '0.75'
## memory: 1G
## Nextcloud ##
nc-app:
container_name: nc-app
image: nextcloud
restart: always
ports:
- 8080:80
links:
- nc-db
- nc-redis
## - nc-oo
volumes:
- ../../Volumes/Nextcloud/nextcloud:/var/www/html
environment:
- NEXTCLOUD_ADMIN_USER=$NEXTCLOUD_ADMIN_USER
- NEXTCLOUD_ADMIN_PASSWORD=$NEXTCLOUD_ADMIN_PASSWORD
- PHP_MEMORY_LIMIT=$PHP_MEMORY_LIMIT
- PHP_UPLOAD_LIMIT=$PHP_UPLOAD_LIMIT
- MYSQL_HOST=$MYSQL_HOST
- MYSQL_DATABASE=$MYSQL_DATABASE
- MYSQL_USER=$MYSQL_USER
- MYSQL_PASSWORD=$MYSQL_PASSWORD
- REDIS_HOST=$REDIS_HOST
- REDIS_HOST_PASSWORD=$REDIS_HOST_PASSWORD
deploy:
mode: global
resources:
limits:
cpus: '0.40'
memory: 640M