diff --git a/install.yaml b/install.yaml index 16c74d7..bb4df5f 100644 --- a/install.yaml +++ b/install.yaml @@ -11,8 +11,6 @@ pre_install_actions: project_files: - config.cron.yaml - web-build/Dockerfile.ddev-cron -- web-build/cron.conf - # List of files and directories that are copied into the global .ddev directory global_files: diff --git a/tests/test.bats b/tests/test.bats index a1ef39f..1b6b098 100644 --- a/tests/test.bats +++ b/tests/test.bats @@ -34,16 +34,16 @@ teardown() { grep UTC time.log } -@test "install from release" { - set -eu -o pipefail - cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) - echo "# ddev get drud/ddev-cron with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 - ddev get drud/ddev-cron - ddev restart - - sleep 61 - # Make sure cron process is running - ddev exec 'sudo killall -0 cron' - # ASSERT: Make sure time.log got a line written to it. - grep UTC time.log -} +#@test "install from release" { +# set -eu -o pipefail +# cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 ) +# echo "# ddev get drud/ddev-cron with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3 +# ddev get drud/ddev-cron +# ddev restart +# +# sleep 61 +# # Make sure cron process is running +# ddev exec 'sudo killall -0 cron' +# # ASSERT: Make sure time.log got a line written to it. +# grep UTC time.log +#} diff --git a/web-build/Dockerfile.ddev-cron b/web-build/Dockerfile.ddev-cron index 68f3bcf..eb6889d 100644 --- a/web-build/Dockerfile.ddev-cron +++ b/web-build/Dockerfile.ddev-cron @@ -2,6 +2,14 @@ # Install cron package; this can be done in webimage_extra_packages, but put it here for now. RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confold" --no-install-recommends --no-install-suggests cron # Tell supervisord to start cron service in cron.conf -ADD cron.conf /etc/supervisor/conf.d +RUN echo " \n \ +[program:cron] \n \ +command=sudo /usr/sbin/cron -f -L7 \n \ +autorestart=true \n \ +startretries=10 \n \ +stdout_logfile=/proc/self/fd/2 \n \ +stdout_logfile_maxbytes=0 \n \ +redirect_stderr=true \n \ +" > /etc/supervisor/conf.d/cron.conf # Make it so you can add to cron.d without root privileges RUN chmod 777 /etc/cron.d /var/run diff --git a/web-build/cron.conf b/web-build/cron.conf deleted file mode 100644 index 0edde38..0000000 --- a/web-build/cron.conf +++ /dev/null @@ -1,8 +0,0 @@ -#ddev-generated -[program:cron] -command=sudo /usr/sbin/cron -f -L7 -autorestart=true -startretries=10 -stdout_logfile=/proc/self/fd/2 -stdout_logfile_maxbytes=0 -redirect_stderr=true