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