mirror of
https://github.com/nextcloud/docker.git
synced 2024-11-18 02:56:42 +01:00
Extended templates to make crontab interval dependent on the version
Signed-off-by: Michael Scheiffler <michael@scheiffler.at>
This commit is contained in:
parent
f165752597
commit
7b97c8a9c2
6 changed files with 13 additions and 5 deletions
|
@ -13,7 +13,7 @@ RUN set -ex; \
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
\
|
\
|
||||||
mkdir -p /var/spool/cron/crontabs; \
|
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
|
# install the PHP extensions we need
|
||||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||||
|
|
|
@ -9,7 +9,7 @@ RUN set -ex; \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
rm /var/spool/cron/crontabs/root; \
|
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
|
# install the PHP extensions we need
|
||||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||||
|
|
|
@ -13,7 +13,7 @@ RUN set -ex; \
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
\
|
\
|
||||||
mkdir -p /var/spool/cron/crontabs; \
|
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
|
# install the PHP extensions we need
|
||||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||||
|
|
|
@ -8,7 +8,7 @@ RUN set -ex; \
|
||||||
; \
|
; \
|
||||||
\
|
\
|
||||||
rm /var/spool/cron/crontabs/root; \
|
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
|
# install the PHP extensions we need
|
||||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||||
|
|
|
@ -12,7 +12,7 @@ RUN set -ex; \
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
rm -rf /var/lib/apt/lists/*; \
|
||||||
\
|
\
|
||||||
mkdir -p /var/spool/cron/crontabs; \
|
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
|
# install the PHP extensions we need
|
||||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||||
|
|
|
@ -23,6 +23,12 @@ declare -A extras=(
|
||||||
[fpm-alpine]=''
|
[fpm-alpine]=''
|
||||||
)
|
)
|
||||||
|
|
||||||
|
declare -A crontab_int=(
|
||||||
|
[default]='5'
|
||||||
|
[16.0]='15'
|
||||||
|
[15.0]='15'
|
||||||
|
)
|
||||||
|
|
||||||
apcu_version="$(
|
apcu_version="$(
|
||||||
git ls-remote --tags https://github.com/krakjoe/apcu.git \
|
git ls-remote --tags https://github.com/krakjoe/apcu.git \
|
||||||
| cut -d/ -f3 \
|
| cut -d/ -f3 \
|
||||||
|
@ -99,6 +105,7 @@ travisEnv=
|
||||||
function create_variant() {
|
function create_variant() {
|
||||||
dir="$1/$variant"
|
dir="$1/$variant"
|
||||||
phpVersion=${php_version[$version]-${php_version[default]}}
|
phpVersion=${php_version[$version]-${php_version[default]}}
|
||||||
|
crontabInt=${crontab_int[$version]-${crontab_int[default]}}
|
||||||
|
|
||||||
# Create the version+variant directory with a Dockerfile.
|
# Create the version+variant directory with a Dockerfile.
|
||||||
mkdir -p "$dir"
|
mkdir -p "$dir"
|
||||||
|
@ -121,6 +128,7 @@ function create_variant() {
|
||||||
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;
|
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;
|
||||||
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
|
s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g;
|
||||||
s/%%IMAGICK_VERSION%%/'"${pecl_versions[imagick]}"'/g;
|
s/%%IMAGICK_VERSION%%/'"${pecl_versions[imagick]}"'/g;
|
||||||
|
s/%%CRONTAB_INT%%/'"$crontabInt"'/g;
|
||||||
' "$dir/Dockerfile"
|
' "$dir/Dockerfile"
|
||||||
|
|
||||||
if [[ "$phpVersion" != 7.3 ]]; then
|
if [[ "$phpVersion" != 7.3 ]]; then
|
||||||
|
|
Loading…
Reference in a new issue