Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crontabs not working as expected #80

Open
michael-niemand opened this issue Jan 12, 2021 · 0 comments
Open

Crontabs not working as expected #80

michael-niemand opened this issue Jan 12, 2021 · 0 comments

Comments

@michael-niemand
Copy link

michael-niemand commented Jan 12, 2021

using wodby/drupal-php:7.3-dev-4.15.9

I'm having a hard time understanding how the crontabs are supposed to work.

in the docker-entrypoint.sh there is the following snippet:

# @deprecated will be removed in favor of bind mounts (config maps).
init_crond() {
    if [[ -n "${CRONTAB}" ]]; then
        _gotpl "crontab.tmpl" "/etc/crontabs/www-data"
    fi
}

Ok, using env var CRONTAB is deprecated, so lets use a crontab file mounted at /etc/crontabs/www-data instead ...
but then there is this snipped in the /usr/local/bin/init_container script, which is called as sudo from the entrypoint script:

if [[ -f /etc/crontabs/www-data && -z "${CRONTAB}" ]]; then
    chown root:www-data /etc/crontabs/www-data
    chmod 660 /etc/crontabs/www-data
fi

this fails of course, when the crontab is mounted as a configmap like I did:

chown: /etc/crontabs/www-data: Read-only file system

In the official documentation I only found small snippets that don't really explain how to actually get a working crontab into the container. Please advise, anything helps. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant