summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormscheiff <michael@scheiffler.at>2019-09-30 19:44:55 +0200
committerTilo Spannagel <development@tilosp.de>2019-10-01 10:54:36 +0200
commit7b97c8a9c20aa220741a3ed7cd82776a40994b23 (patch)
tree075cd11029a10c1fc55f13dd36099150409b4dc6
parentf1657525976375aa2ea4be5cbb306d29177c4a20 (diff)
Extended templates to make crontab interval dependent on the version
Signed-off-by: Michael Scheiffler <michael@scheiffler.at>
-rw-r--r--17.0/apache/Dockerfile2
-rw-r--r--17.0/fpm-alpine/Dockerfile2
-rw-r--r--17.0/fpm/Dockerfile2
-rw-r--r--Dockerfile-alpine.template2
-rw-r--r--Dockerfile-debian.template2
-rwxr-xr-xupdate.sh8
6 files changed, 13 insertions, 5 deletions
diff --git a/17.0/apache/Dockerfile b/17.0/apache/Dockerfile
index 87f5d7ee..462b636b 100644
--- a/17.0/apache/Dockerfile
+++ b/17.0/apache/Dockerfile
@@ -13,7 +13,7 @@ RUN set -ex; \
rm -rf /var/lib/apt/lists/*; \
\
mkdir -p /var/spool/cron/crontabs; \
- echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
+ echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
diff --git a/17.0/fpm-alpine/Dockerfile b/17.0/fpm-alpine/Dockerfile
index b8fb9b2a..6123e1bf 100644
--- a/17.0/fpm-alpine/Dockerfile
+++ b/17.0/fpm-alpine/Dockerfile
@@ -9,7 +9,7 @@ RUN set -ex; \
; \
\
rm /var/spool/cron/crontabs/root; \
- echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
+ echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
diff --git a/17.0/fpm/Dockerfile b/17.0/fpm/Dockerfile
index 6f19da19..58458ed8 100644
--- a/17.0/fpm/Dockerfile
+++ b/17.0/fpm/Dockerfile
@@ -13,7 +13,7 @@ RUN set -ex; \
rm -rf /var/lib/apt/lists/*; \
\
mkdir -p /var/spool/cron/crontabs; \
- echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
+ echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template
index 18e79575..065e5fe9 100644
--- a/Dockerfile-alpine.template
+++ b/Dockerfile-alpine.template
@@ -8,7 +8,7 @@ RUN set -ex; \
; \
\
rm /var/spool/cron/crontabs/root; \
- echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
+ echo '*/%%CRONTAB_INT%% * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template
index 3e1beb0b..642c4fdc 100644
--- a/Dockerfile-debian.template
+++ b/Dockerfile-debian.template
@@ -12,7 +12,7 @@ RUN set -ex; \
rm -rf /var/lib/apt/lists/*; \
\
mkdir -p /var/spool/cron/crontabs; \
- echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
+ echo '*/%%CRONTAB_INT%% * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
# install the PHP extensions we need
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
diff --git a/update.sh b/update.sh
index c6fe8bd2..9bbcde18 100755
--- a/update.sh
+++ b/update.sh
@@ -23,6 +23,12 @@ declare -A extras=(
[fpm-alpine]=''
)
+declare -A crontab_int=(
+ [default]='5'
+ [16.0]='15'
+ [15.0]='15'
+)
+
apcu_version="$(
git ls-remote --tags https://github.com/krakjoe/apcu.git \
| cut -d/ -f3 \
@@ -99,6 +105,7 @@ travisEnv=
function create_variant() {
dir="$1/$variant"
phpVersion=${php_version[$version]-${php_version[default]}}
+ crontabInt=${crontab_int[$version]-${crontab_int[default]}}
# Create the version+variant directory with a Dockerfile.
mkdir -p "$dir"
@@ -121,6 +128,7 @@ function create_variant() {
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
s/%%IMAGICK_VERSION%%/'"${pecl_versions[imagick]}"'/g;
+ s/%%CRONTAB_INT%%/'"$crontabInt"'/g;
' "$dir/Dockerfile"
if [[ "$phpVersion" != 7.3 ]]; then