Skip to content

Commit a3ba284

Browse files
authored
Merge pull request #879 from mike2307/crontab_int_5min
Extended templates to make crontab interval dependent on the version
2 parents 1985c82 + 7b97c8a commit a3ba284

File tree

6 files changed

+13
-5
lines changed

6 files changed

+13
-5
lines changed

17.0/apache/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN set -ex; \
1313
rm -rf /var/lib/apt/lists/*; \
1414
\
1515
mkdir -p /var/spool/cron/crontabs; \
16-
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
16+
echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
1717

1818
# install the PHP extensions we need
1919
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html

17.0/fpm-alpine/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN set -ex; \
99
; \
1010
\
1111
rm /var/spool/cron/crontabs/root; \
12-
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
12+
echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
1313

1414
# install the PHP extensions we need
1515
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html

17.0/fpm/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RUN set -ex; \
1313
rm -rf /var/lib/apt/lists/*; \
1414
\
1515
mkdir -p /var/spool/cron/crontabs; \
16-
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
16+
echo '*/5 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
1717

1818
# install the PHP extensions we need
1919
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html

Dockerfile-alpine.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN set -ex; \
88
; \
99
\
1010
rm /var/spool/cron/crontabs/root; \
11-
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
11+
echo '*/%%CRONTAB_INT%% * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
1212

1313
# install the PHP extensions we need
1414
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html

Dockerfile-debian.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN set -ex; \
1212
rm -rf /var/lib/apt/lists/*; \
1313
\
1414
mkdir -p /var/spool/cron/crontabs; \
15-
echo '*/15 * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
15+
echo '*/%%CRONTAB_INT%% * * * * php -f /var/www/html/cron.php' > /var/spool/cron/crontabs/www-data
1616

1717
# install the PHP extensions we need
1818
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html

update.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ declare -A extras=(
2323
[fpm-alpine]=''
2424
)
2525

26+
declare -A crontab_int=(
27+
[default]='5'
28+
[16.0]='15'
29+
[15.0]='15'
30+
)
31+
2632
apcu_version="$(
2733
git ls-remote --tags https://github.com/krakjoe/apcu.git \
2834
| cut -d/ -f3 \
@@ -99,6 +105,7 @@ travisEnv=
99105
function create_variant() {
100106
dir="$1/$variant"
101107
phpVersion=${php_version[$version]-${php_version[default]}}
108+
crontabInt=${crontab_int[$version]-${crontab_int[default]}}
102109

103110
# Create the version+variant directory with a Dockerfile.
104111
mkdir -p "$dir"
@@ -121,6 +128,7 @@ function create_variant() {
121128
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;
122129
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
123130
s/%%IMAGICK_VERSION%%/'"${pecl_versions[imagick]}"'/g;
131+
s/%%CRONTAB_INT%%/'"$crontabInt"'/g;
124132
' "$dir/Dockerfile"
125133

126134
if [[ "$phpVersion" != 7.3 ]]; then

0 commit comments

Comments
 (0)