Skip to content

Commit

Permalink
Change: Enable redis in owncloud example
Browse files Browse the repository at this point in the history
  • Loading branch information
Jens-H committed Mar 7, 2016
1 parent 6b00972 commit ee51716
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions examples/owncloud/add-Redis-cache
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh
sed -i '/);/ i\
\ '\''memcache.local'\'' => '\''\\OC\\Memcache\\Redis'\'',\
\ '\''memcache.locking'\'' => '\''\\OC\\Memcache\\Redis'\'',\
\ '\''redis'\'' => array(\
\ '\''host'\'' => '\''localhost'\'',\
\ '\''port'\'' => 6379,\
\ ),' /var/www/html/owncloud/config/config.php
8 changes: 6 additions & 2 deletions examples/owncloud/owncloud-config
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ EXEC apt-get upgrade -y

# Install extra software via apt
EXEC apt-get install -y apache2 libapache2-mod-php5 curl php5-gd php5-json php5-sqlite php5-curl php5-intl php5-mcrypt
EXEC apt-get install -y php5-imagick php5-imap php-net-ftp php5-imagick php5-memcached
EXEC apt-get install -y php5-imagick php5-imap php-net-ftp php5-imagick redis-server php5-redis
SNAPSHOT after-apt-install

# Download owncloud
Expand All @@ -29,9 +29,13 @@ EXEC sh -c '(cd /var/www/html/owncloud/ && sudo -u www-data php occ maintenanc
FILE strong-dir-perm-script /root/
EXEC ./strong-dir-perm-script

# Set the IP in the config.php - Unfortunately this has to be done every time the IP changes
# Set the IP in the config.php - Unfortunately this has to be done MANUALLY in the future every time the IP changes.
FILE replace-IP /root/
EXEC ./replace-IP

# Add Redis as local memcache
FILE add-Redis-cache /root/
EXEC ./add-Redis-cache
EXEC systemctl restart apache2.service

# Make image
Expand Down

0 comments on commit ee51716

Please sign in to comment.