mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-07-03 07:35:41 +00:00
nextcloud: fix, php 7.1, remove redis
This commit is contained in:
@ -1,20 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
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 \
|
||||
-e "s/<REDIS_MAX_MEMORY>/$REDIS_MAX_MEMORY/g" /etc/redis.conf \
|
||||
sed -i -e "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/nginx/nginx.conf /etc/php7.1/php-fpm.conf \
|
||||
-e "s/<APC_SHM_SIZE>/$APC_SHM_SIZE/g" /etc/php7.1/conf.d/apcu.ini \
|
||||
-e "s/<OPCACHE_MEM_SIZE>/$OPCACHE_MEM_SIZE/g" /etc/php7.1/conf.d/00_opcache.ini \
|
||||
-e "s/<CRON_MEMORY_LIMIT>/$CRON_MEMORY_LIMIT/g" /etc/s6.d/cron/run \
|
||||
-e "s/<CRON_PERIOD>/$CRON_PERIOD/g" /etc/s6.d/cron/run
|
||||
|
||||
# Put the configuration and apps into volumes
|
||||
ln -sf /config/config.php /nextcloud/config/config.php &>/dev/null
|
||||
ln -sf /apps2 /nextcloud &>/dev/null
|
||||
|
||||
for dir in /nextcloud /data /config /apps2 /etc/nginx /etc/php7 /var/log /var/lib/nginx /var/lib/redis /tmp /etc/s6.d; do
|
||||
mv nextcloud fix && mv fix nextcloud # fix strange bug
|
||||
|
||||
echo "Updating permissions..."
|
||||
for dir in /nextcloud /data /config /apps2 /etc/nginx /etc/php7.1 /var/log /var/lib/nginx /tmp /etc/s6.d; do
|
||||
if $(find $dir ! -user $UID -o ! -group $GID|egrep '.' -q); then
|
||||
echo "Updating permissions in $dir..."
|
||||
chown -R $UID:$GID $dir
|
||||
else
|
||||
echo "Permissions in $dir are correct."
|
||||
fi
|
||||
done
|
||||
echo "Done updating permissions."
|
||||
|
||||
if [ ! -f /config/config.php ]; then
|
||||
# New installation, run the setup
|
||||
|
Reference in New Issue
Block a user