From 1ac06a288a414998ff33e098c617b16029150738 Mon Sep 17 00:00:00 2001 From: Jonathan Branan Date: Thu, 22 Jun 2023 03:22:16 -0500 Subject: [PATCH] added supercronic --- Dockerfile | 2 -- entrypoint.sh | 9 +++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index eac6b10..340434b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,7 @@ from alpine:latest RUN apk add --no-cache curl,supercronic -COPY crontab opt COPY entrypoint.sh opt COPY phc.sh opt -RUN crontab /opt/crontab RUN chmod +x /opt/entrypoint.sh RUN chmod +x /opt/phc.sh CMD ["/opt/entrypoint.sh"] \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index beff1c1..e5d8951 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,10 +1,7 @@ #!/bin/sh + CRON_CONFIG_FILE="/opt/crontab" -# CRON -get_env CRON -CRON="${CRON:-"5 * * * *"}" +echo "${CRON} sh /opt/phc.sh" > $CRON_CONFIG_FILE -echo "${CRON} sh /opt/phc.sh" >> "${CRON_CONFIG_FILE}" - -exec supercronic -passthrough-logs -quiet "${CRON_CONFIG_FILE}" \ No newline at end of file +exec supercronic -passthrough-logs -quiet $CRON_CONFIG_FILE \ No newline at end of file