shlinkio / shlink

The definitive self-hosted URL shortener
https://shlink.io
MIT License
3.3k stars 262 forks source link

Consider using supercronic for Cron in Docker container #1689

Closed onedr0p closed 1 year ago

onedr0p commented 1 year ago

@acelaya you could use https://github.com/aptible/supercronic instead. It's even in the alpine pkg registry and can run as a user instead of root.

apk add --no-cache supercronic

then in your entrypoint

echo "$CRON_SCHEDULE /whatever.sh" > /tmp/crontab
supercronic -passthrough-logs /tmp/crontab &

Originally posted by @onedr0p in https://github.com/shlinkio/shlink/issues/1132#issuecomment-1409308561

acelaya commented 1 year ago

This will be addressed differently in the end. See https://github.com/shlinkio/shlink/pull/1763#issuecomment-1531972820