nextcloud memory tuning

This commit is contained in:
oxmox 2023-09-04 20:56:10 +02:00
parent 808e70d40a
commit 4b2d2eb304

View file

@ -51,7 +51,23 @@ services:
image: mariadb:latest
container_name: "nextcloud-db"
restart: unless-stopped
command: --transaction-isolation=READ-COMMITTED --log-bin=binlog --binlog-format=ROW
command:
- --transaction-isolation=READ-COMMITTED
- --log-bin=binlog
- --binlog-format=ROW
# Memory usage tuning.
- --max-connections=100
- --thread-cache-size=2
- --query-cache-size=1048576
- --sort-buffer-size=1048576
- --bulk-insert-buffer-size=0
- --tmp-table-size=4194304
- --max-heap-table-size=4194304
- --key-buffer-size=4194304
- --read-buffer-size=131072
- --read-rnd-buffer-size=262144
- --innodb-buffer-pool-size=10485760
- --innodb-log-buffer-size=4194304
volumes:
- ./nextcloud-db:/var/lib/mysql
- /etc/timezone:/etc/timezone:ro
@ -85,10 +101,14 @@ services:
- MYSQL_HOST=nextcloud-db
- MYSQL_PASSWORD_FILE=/run/secrets/nextcloud_db_password
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/nextcloud_db_root_password
# https://github.com/nextcloud/docker/blob/master/README.md#using-the-apache-image-behind-a-reverse-proxy-and-auto-configure-server-host-and-protocol
# reverse proxy setup
- APACHE_DISABLE_REWRITE_IP=1
- TRUSTED_PROXIES=192.168.128.0/24
- NEXTCLOUD_TRUSTED_DOMAINS=*
# PHP tuning
- PHP_MEMORY_LIMIT=128M # default=512M
- PHP_UPLOAD_LIMIT=512M # default=512M
# Sadly this did not work for me.
#- NEXTCLOUD_ADMIN_USER=admin
#- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password
secrets: