From 6e689fb3e8a5dd5f77b801b5c67252a6c1883270 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Mon, 29 Aug 2016 18:05:05 +0100 Subject: [PATCH 1/4] add php5-opcache dependency --- Dockerfile | 1 + README.md | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6e8ac66..464e64b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ RUN \ php5-dom \ php5-gd \ php5-intl \ + php5-opcache \ php5-openssl \ php5-pdo_sqlite diff --git a/README.md b/README.md index 5ff9422..ae8c3e9 100644 --- a/README.md +++ b/README.md @@ -93,5 +93,6 @@ Unlike other implementations of COPS in a docker container, the linuxserver ver ## Version Log -+ + **28.08.16:** Add badges to README. -+ + **12.08.16:** Release ++ **29.08.16:** Add php5-opcache. ++ **28.08.16:** Add badges to README. ++ **12.08.16:** Release From 14b2fbe00093e591ddcabebea7a3694dac07fe49 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Mon, 29 Aug 2016 18:19:12 +0100 Subject: [PATCH 2/4] add cache configuration --- root/defaults/config_local.php | 5 ++++- root/etc/cont-init.d/40-config | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/root/defaults/config_local.php b/root/defaults/config_local.php index c5a5b14..5c97c46 100644 --- a/root/defaults/config_local.php +++ b/root/defaults/config_local.php @@ -33,7 +33,10 @@ */ $config['cops_x_accel_redirect'] = "X-Accel-Redirect"; - + /* Enable cache folder + * especially useful for lower power hosts + */ + $config['cops_thumbnail_cache_directory'] = "/cache"; /* * Enable and configure Send To Kindle (or Email) feature. * diff --git a/root/etc/cont-init.d/40-config b/root/etc/cont-init.d/40-config index a0ded90..43bdf89 100644 --- a/root/etc/cont-init.d/40-config +++ b/root/etc/cont-init.d/40-config @@ -1,5 +1,9 @@ #!/usr/bin/with-contenv bash +# create folders +mkdir -p \ + /cache + # make symlink [[ ! -e /var/www/localhost/cops ]] && \ ln -s /usr/share/webapps/cops /var/www/localhost/cops @@ -11,6 +15,7 @@ cp /config/config_local.php /var/www/localhost/cops/ # permissions chown -R abc:abc \ + /cache \ /config \ /usr/share/webapps/cops \ var/www/localhost/cops From ccd109db7d50868c699bb1ca9aa9eedf82861d4a Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Mon, 29 Aug 2016 18:24:53 +0100 Subject: [PATCH 3/4] fix config for cache --- root/defaults/config_local.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/root/defaults/config_local.php b/root/defaults/config_local.php index 5c97c46..2810ec8 100644 --- a/root/defaults/config_local.php +++ b/root/defaults/config_local.php @@ -36,7 +36,8 @@ /* Enable cache folder * especially useful for lower power hosts */ - $config['cops_thumbnail_cache_directory'] = "/cache"; + $config['cops_thumbnail_handling'] = ""; + $config['cops_thumbnail_cache_directory'] = "/cache/"; /* * Enable and configure Send To Kindle (or Email) feature. * From 545a27015457413e6d684e28d2d7daa18eb30348 Mon Sep 17 00:00:00 2001 From: sparklyballs Date: Mon, 29 Aug 2016 19:49:31 +0100 Subject: [PATCH 4/4] move cache to /config subfolder, in case it gets large and balloons the container --- root/defaults/config_local.php | 2 +- root/etc/cont-init.d/40-config | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/root/defaults/config_local.php b/root/defaults/config_local.php index 2810ec8..37afa4d 100644 --- a/root/defaults/config_local.php +++ b/root/defaults/config_local.php @@ -37,7 +37,7 @@ * especially useful for lower power hosts */ $config['cops_thumbnail_handling'] = ""; - $config['cops_thumbnail_cache_directory'] = "/cache/"; + $config['cops_thumbnail_cache_directory'] = "/config/cache/"; /* * Enable and configure Send To Kindle (or Email) feature. * diff --git a/root/etc/cont-init.d/40-config b/root/etc/cont-init.d/40-config index 43bdf89..30971eb 100644 --- a/root/etc/cont-init.d/40-config +++ b/root/etc/cont-init.d/40-config @@ -2,7 +2,7 @@ # create folders mkdir -p \ - /cache + /config/cache # make symlink [[ ! -e /var/www/localhost/cops ]] && \ @@ -15,7 +15,6 @@ cp /config/config_local.php /var/www/localhost/cops/ # permissions chown -R abc:abc \ - /cache \ /config \ /usr/share/webapps/cops \ var/www/localhost/cops