mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 04:19:18 +00:00
nextcloud: add variables for apc and opcache memory size
This commit is contained in:
parent
d2969c59ea
commit
649cf6c819
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -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 \
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user