mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-07-01 14:45:38 +00:00
nextcloud: add variables for apc and opcache memory size
This commit is contained in:
@ -2,7 +2,9 @@ FROM alpine:3.4
|
||||
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
||||
|
||||
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 \
|
||||
|
@ -1,4 +1,4 @@
|
||||
extension=apcu.so
|
||||
apc.enabled=1
|
||||
apc.shm_size=128M
|
||||
apc.shm_size=<APC_SHM_SIZE>
|
||||
apc.ttl=7200
|
||||
|
@ -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_MEM_SIZE>
|
||||
opcache.interned_strings_buffer=16
|
||||
opcache.max_accelerated_files=5413
|
||||
opcache.revalidate_freq=60
|
||||
|
@ -4,7 +4,9 @@ if [ ! -f /config/config.php ]; then
|
||||
echo -e "<?php\n\$CONFIG = array (\n 'datadirectory' => '/data',\n);" > /config/config.php
|
||||
fi
|
||||
|
||||
sed -i -e "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/php7/php-fpm.conf
|
||||
sed -i -e "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/php7/php-fpm.conf \
|
||||
-e "s/<APC_SHM_SIZE>/$APC_SHM_SIZE/g" /etc/php7/conf.d/apcu.ini \
|
||||
-e "s/<OPCACHE_MEM_SIZE>/$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
|
||||
|
Reference in New Issue
Block a user