mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-07-01 14:45:38 +00:00
nextcloud: use redis for file locking cache
This commit is contained in:
@ -7,6 +7,7 @@ ENV UID=991 GID=991 \
|
||||
UPLOAD_MAX_SIZE=10G \
|
||||
APC_SHM_SIZE=128M \
|
||||
OPCACHE_MEM_SIZE=128 \
|
||||
REDIS_MAX_MEMORY=64mb \
|
||||
CRON_PERIOD=15m \
|
||||
TZ=Etc/UTC \
|
||||
DB_TYPE=sqlite3 \
|
||||
@ -31,6 +32,7 @@ RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/a
|
||||
samba-client \
|
||||
su-exec \
|
||||
tzdata \
|
||||
redis \
|
||||
php7@commuedge \
|
||||
php7-fpm@commuedge \
|
||||
php7-intl@commuedge \
|
||||
@ -82,6 +84,7 @@ COPY nginx.conf /etc/nginx/nginx.conf
|
||||
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
||||
COPY opcache.ini /etc/php7/conf.d/00_opcache.ini
|
||||
COPY apcu.ini /etc/php7/conf.d/apcu.ini
|
||||
COPY redis.conf /etc/redis.conf
|
||||
COPY run.sh /usr/local/bin/run.sh
|
||||
COPY setup.sh /usr/local/bin/setup.sh
|
||||
COPY occ /usr/local/bin/occ
|
||||
@ -89,7 +92,7 @@ COPY s6.d /etc/s6.d
|
||||
|
||||
RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
|
||||
|
||||
VOLUME /data /config /apps2
|
||||
VOLUME /data /config /apps2 /var/lib/redis
|
||||
|
||||
EXPOSE 8888
|
||||
|
||||
|
14
nextcloud/daily/redis.conf
Normal file
14
nextcloud/daily/redis.conf
Normal file
@ -0,0 +1,14 @@
|
||||
bind 127.0.0.1
|
||||
protected-mode yes
|
||||
port 0
|
||||
unixsocket /tmp/redis.sock
|
||||
unixsocketperm 700
|
||||
daemonize no
|
||||
pidfile /tmp/redis.pid
|
||||
logfile /tmp/redis.log
|
||||
save 900 1
|
||||
save 300 10
|
||||
save 60 10000
|
||||
dbfilename dump.rdb
|
||||
dir /var/lib/redis/
|
||||
maxmemory <REDIS_MAX_MEMORY>
|
2
nextcloud/daily/s6.d/redis/run
Normal file
2
nextcloud/daily/s6.d/redis/run
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec redis-server /etc/redis.conf
|
@ -29,6 +29,13 @@ cat > $CONFIGFILE <<EOF;
|
||||
|
||||
'memcache.local' => '\OC\Memcache\APCu',
|
||||
|
||||
'memcache.locking' => '\OC\Memcache\Redis',
|
||||
'redis' => array(
|
||||
'host' => '/tmp/redis.sock',
|
||||
'port' => 0,
|
||||
'timeout' => 0.0,
|
||||
),
|
||||
|
||||
'instanceid' => '$instanceid',
|
||||
);
|
||||
?>
|
||||
@ -85,10 +92,7 @@ php7 <<EOF > $CONFIG_TEMP && mv $CONFIG_TEMP $CONFIGFILE
|
||||
<?php
|
||||
include("/config/config.php");
|
||||
|
||||
\$CONFIG['trusted_domains'] = array('$VIRTUAL_HOST');
|
||||
|
||||
//\$CONFIG['memcache.local'] = '\\OC\\Memcache\\Memcached';
|
||||
//\$CONFIG['overwrite.cli.url'] = '/cloud';
|
||||
\$CONFIG['mail_from_address'] = 'administrator'; # just the local part, matches our master administrator address
|
||||
|
||||
\$CONFIG['logtimezone'] = '$TZ';
|
||||
|
Reference in New Issue
Block a user