dev-migrate-supercronic #1
| @@ -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"] | ||||||
| @@ -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}" |  | ||||||
		Reference in New Issue
	
	Block a user