nextcloud memory tuning
This commit is contained in:
parent
808e70d40a
commit
4b2d2eb304
1 changed files with 22 additions and 2 deletions
|
@ -51,7 +51,23 @@ services:
|
||||||
image: mariadb:latest
|
image: mariadb:latest
|
||||||
container_name: "nextcloud-db"
|
container_name: "nextcloud-db"
|
||||||
restart: unless-stopped
|
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:
|
volumes:
|
||||||
- ./nextcloud-db:/var/lib/mysql
|
- ./nextcloud-db:/var/lib/mysql
|
||||||
- /etc/timezone:/etc/timezone:ro
|
- /etc/timezone:/etc/timezone:ro
|
||||||
|
@ -85,10 +101,14 @@ services:
|
||||||
- MYSQL_HOST=nextcloud-db
|
- MYSQL_HOST=nextcloud-db
|
||||||
- MYSQL_PASSWORD_FILE=/run/secrets/nextcloud_db_password
|
- MYSQL_PASSWORD_FILE=/run/secrets/nextcloud_db_password
|
||||||
- MYSQL_ROOT_PASSWORD_FILE=/run/secrets/nextcloud_db_root_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
|
- APACHE_DISABLE_REWRITE_IP=1
|
||||||
- TRUSTED_PROXIES=192.168.128.0/24
|
- TRUSTED_PROXIES=192.168.128.0/24
|
||||||
- NEXTCLOUD_TRUSTED_DOMAINS=*
|
- 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_USER=admin
|
||||||
#- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password
|
#- NEXTCLOUD_ADMIN_PASSWORD_FILE=/run/secrets/nextcloud_admin_password
|
||||||
secrets:
|
secrets:
|
||||||
|
|
Loading…
Reference in a new issue