Skip to content

Commit

Permalink
Add redis
Browse files Browse the repository at this point in the history
  • Loading branch information
OnGle committed May 21, 2019
1 parent 5543ecd commit bb5aa16
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
19 changes: 19 additions & 0 deletions conf.d/main
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,25 @@ php occ maintenance:install --database "mysql" \
--database-name "$DB_NAME" --database-user "$DB_USER" --database-pass "$DB_PASS" \
--admin-user "$ADMIN_NAME" --admin-pass "$ADMIN_PASS"

# adjust owncloud config for redis
sed -i '/^);/d' /usr/share/owncloud/config/config.php
cat <<EOF >> /usr/share/owncloud/config/config.php
'memcache.local' => '\OC\Memcache\Redis',
'redis' => [
'host' => '/var/run/redis/redis.sock',
'port' => 0,
],
'memcache.locking' => '\OC\Memcache\Redis',
);
EOF

# add www-data user to redis group
usermod -a -G redis www-data

# adjust redis config
sed -i 's|# unixsocket .*|unixsocket /var/run/redis/redis.sock|g' /etc/redis/redis.conf
sed -i 's|# unixsocketperm .*|unixsocketperm 770|g' /etc/redis/redis.conf

chown -R root:root $WEBROOT
chown -R www-data:www-data /usr/share/owncloud/{config,apps,data}

Expand Down
4 changes: 4 additions & 0 deletions plan/main
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ php7.2-mbstring
php-pear
php7.2-xml

redis-server
php-igbinary
php-redis

smbclient
php7.2-ldap
php7.2-imap
Expand Down

0 comments on commit bb5aa16

Please sign in to comment.