Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
26 changes: 13 additions & 13 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
#}
10 changes: 9 additions & 1 deletion web-build/Dockerfile.ddev-cron
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 0 additions & 8 deletions web-build/cron.conf

This file was deleted.