diff --git a/nextcloud/10.0/Dockerfile b/nextcloud/10.0/Dockerfile index 0e74d1b..bb4c0f0 100644 --- a/nextcloud/10.0/Dockerfile +++ b/nextcloud/10.0/Dockerfile @@ -5,7 +5,9 @@ ARG NEXTCLOUD_VERSION=10.0.0 ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A" ENV UID=991 GID=991 \ - UPLOAD_MAX_SIZE=10G + UPLOAD_MAX_SIZE=10G \ + APC_SHM_SIZE=128M \ + OPCACHE_MEM_SIZE=128 RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ && echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ diff --git a/nextcloud/10.0/apcu.ini b/nextcloud/10.0/apcu.ini index 03f5011..1bf9b49 100644 --- a/nextcloud/10.0/apcu.ini +++ b/nextcloud/10.0/apcu.ini @@ -1,4 +1,4 @@ extension=apcu.so apc.enabled=1 -apc.shm_size=128M +apc.shm_size= apc.ttl=7200 diff --git a/nextcloud/10.0/opcache.ini b/nextcloud/10.0/opcache.ini index 861ea15..705e399 100644 --- a/nextcloud/10.0/opcache.ini +++ b/nextcloud/10.0/opcache.ini @@ -2,7 +2,7 @@ zend_extension=opcache.so opcache.enable=1 opcache.enable_cli=1 opcache.fast_shutdown=1 -opcache.memory_consumption=128 +opcache.memory_consumption= opcache.interned_strings_buffer=16 opcache.max_accelerated_files=5413 opcache.revalidate_freq=60 diff --git a/nextcloud/10.0/run.sh b/nextcloud/10.0/run.sh index 8778e29..b92537d 100644 --- a/nextcloud/10.0/run.sh +++ b/nextcloud/10.0/run.sh @@ -4,7 +4,9 @@ if [ ! -f /config/config.php ]; then echo -e " '/data',\n);" > /config/config.php fi -sed -i -e "s//$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/php7/php-fpm.conf +sed -i -e "s//$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/php7/php-fpm.conf \ + -e "s//$APC_SHM_SIZE/g" /etc/php7/conf.d/apcu.ini \ + -e "s//$OPCACHE_MEM_SIZE/g" /etc/php7/conf.d/00_opcache.ini chown -R $UID:$GID /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d ln -s /config/config.php /nextcloud/config/config.php diff --git a/nextcloud/9.0/Dockerfile b/nextcloud/9.0/Dockerfile index 11308e2..51e4924 100644 --- a/nextcloud/9.0/Dockerfile +++ b/nextcloud/9.0/Dockerfile @@ -5,7 +5,9 @@ ARG NEXTCLOUD_VERSION=9.0.53 ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A" ENV UID=991 GID=991 \ - UPLOAD_MAX_SIZE=10G + UPLOAD_MAX_SIZE=10G \ + APC_SHM_SIZE=128M \ + OPCACHE_MEM_SIZE=128 RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ && echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ diff --git a/nextcloud/9.0/apcu.ini b/nextcloud/9.0/apcu.ini index 03f5011..1bf9b49 100644 --- a/nextcloud/9.0/apcu.ini +++ b/nextcloud/9.0/apcu.ini @@ -1,4 +1,4 @@ extension=apcu.so apc.enabled=1 -apc.shm_size=128M +apc.shm_size= apc.ttl=7200 diff --git a/nextcloud/9.0/opcache.ini b/nextcloud/9.0/opcache.ini index 861ea15..705e399 100644 --- a/nextcloud/9.0/opcache.ini +++ b/nextcloud/9.0/opcache.ini @@ -2,7 +2,7 @@ zend_extension=opcache.so opcache.enable=1 opcache.enable_cli=1 opcache.fast_shutdown=1 -opcache.memory_consumption=128 +opcache.memory_consumption= opcache.interned_strings_buffer=16 opcache.max_accelerated_files=5413 opcache.revalidate_freq=60 diff --git a/nextcloud/9.0/run.sh b/nextcloud/9.0/run.sh index 8778e29..b92537d 100644 --- a/nextcloud/9.0/run.sh +++ b/nextcloud/9.0/run.sh @@ -4,7 +4,9 @@ if [ ! -f /config/config.php ]; then echo -e " '/data',\n);" > /config/config.php fi -sed -i -e "s//$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/php7/php-fpm.conf +sed -i -e "s//$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/php7/php-fpm.conf \ + -e "s//$APC_SHM_SIZE/g" /etc/php7/conf.d/apcu.ini \ + -e "s//$OPCACHE_MEM_SIZE/g" /etc/php7/conf.d/00_opcache.ini chown -R $UID:$GID /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d ln -s /config/config.php /nextcloud/config/config.php diff --git a/nextcloud/README.md b/nextcloud/README.md index 25dfa5a..2be33ef 100644 --- a/nextcloud/README.md +++ b/nextcloud/README.md @@ -29,6 +29,8 @@ - **UID** : nextcloud user id *(default : 991)* - **GID** : nextcloud group id *(default : 991)* - **UPLOAD_MAX_SIZE** : maximum upload size *(default : 10G)* +- **APC_SHM_SIZE** : apc memory size *(default : 128M)* +- **OPCACHE_MEM_SIZE** : opcache memoery size in megabytes *(default : 128)* #### Port - **8888** (recently changed, nginx now runs without root) diff --git a/nextcloud/daily/Dockerfile b/nextcloud/daily/Dockerfile index 0ddcf20..2ed9f85 100644 --- a/nextcloud/daily/Dockerfile +++ b/nextcloud/daily/Dockerfile @@ -2,7 +2,9 @@ FROM alpine:3.4 MAINTAINER Wonderfall ENV UID=991 GID=991 \ - UPLOAD_MAX_SIZE=10G + UPLOAD_MAX_SIZE=10G \ + APC_SHM_SIZE=128M \ + OPCACHE_MEM_SIZE=128 RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ && echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ diff --git a/nextcloud/daily/apcu.ini b/nextcloud/daily/apcu.ini index 03f5011..1bf9b49 100644 --- a/nextcloud/daily/apcu.ini +++ b/nextcloud/daily/apcu.ini @@ -1,4 +1,4 @@ extension=apcu.so apc.enabled=1 -apc.shm_size=128M +apc.shm_size= apc.ttl=7200 diff --git a/nextcloud/daily/opcache.ini b/nextcloud/daily/opcache.ini index 861ea15..705e399 100644 --- a/nextcloud/daily/opcache.ini +++ b/nextcloud/daily/opcache.ini @@ -2,7 +2,7 @@ zend_extension=opcache.so opcache.enable=1 opcache.enable_cli=1 opcache.fast_shutdown=1 -opcache.memory_consumption=128 +opcache.memory_consumption= opcache.interned_strings_buffer=16 opcache.max_accelerated_files=5413 opcache.revalidate_freq=60 diff --git a/nextcloud/daily/run.sh b/nextcloud/daily/run.sh index 8778e29..b92537d 100644 --- a/nextcloud/daily/run.sh +++ b/nextcloud/daily/run.sh @@ -4,7 +4,9 @@ if [ ! -f /config/config.php ]; then echo -e " '/data',\n);" > /config/config.php fi -sed -i -e "s//$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/php7/php-fpm.conf +sed -i -e "s//$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/php7/php-fpm.conf \ + -e "s//$APC_SHM_SIZE/g" /etc/php7/conf.d/apcu.ini \ + -e "s//$OPCACHE_MEM_SIZE/g" /etc/php7/conf.d/00_opcache.ini chown -R $UID:$GID /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /tmp /etc/s6.d ln -s /config/config.php /nextcloud/config/config.php