dev-migrate-supercronic #1

Merged
jblu merged 5 commits from dev-migrate-supercronic into main 2023-06-22 18:26:17 -05:00
2 changed files with 3 additions and 8 deletions
Showing only changes of commit 1ac06a288a - Show all commits

View File

@ -1,9 +1,7 @@
from alpine:latest from alpine:latest
RUN apk add --no-cache curl,supercronic RUN apk add --no-cache curl,supercronic
COPY crontab opt
COPY entrypoint.sh opt COPY entrypoint.sh opt
COPY phc.sh opt COPY phc.sh opt
RUN crontab /opt/crontab
RUN chmod +x /opt/entrypoint.sh RUN chmod +x /opt/entrypoint.sh
RUN chmod +x /opt/phc.sh RUN chmod +x /opt/phc.sh
CMD ["/opt/entrypoint.sh"] CMD ["/opt/entrypoint.sh"]

View File

@ -1,10 +1,7 @@
#!/bin/sh #!/bin/sh
CRON_CONFIG_FILE="/opt/crontab" CRON_CONFIG_FILE="/opt/crontab"
# CRON echo "${CRON} sh /opt/phc.sh" > $CRON_CONFIG_FILE
get_env CRON
CRON="${CRON:-"5 * * * *"}"
echo "${CRON} sh /opt/phc.sh" >> "${CRON_CONFIG_FILE}" exec supercronic -passthrough-logs -quiet $CRON_CONFIG_FILE
exec supercronic -passthrough-logs -quiet "${CRON_CONFIG_FILE}"