File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,8 @@ FROM alpine:3.19.1
22LABEL maintainer="Fedor Borshev <fedor@borshev.com>"
33
44RUN apk update \
5- && apk --no-cache add dumb-init postgresql-client curl aws-cli
5+ && apk --no-cache add dumb-init postgresql-client curl aws-cli supercronic
66
7- RUN curl -L https://github.com/odise/go-cron/releases/download/v0.0.7/go-cron-linux.gz | zcat > /usr/local/bin/go-cron && chmod +x /usr/local/bin/go-cron
87
98ENV POSTGRES_DATABASE **None**
109ENV POSTGRES_HOST **None**
@@ -24,5 +23,7 @@ ENV SCHEDULE **None**
2423ADD entrypoint.sh .
2524ADD backup.sh .
2625
26+ HEALTHCHECK CMD curl --fail http://localhost:9746/health || exit 1
27+
2728ENTRYPOINT ["/usr/bin/dumb-init" , "--" ]
2829CMD ["sh" , "entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ if [ "${S3_S3V4}" = "yes" ]; then
77fi
88
99if [ " ${SCHEDULE} " = " **None**" ]; then
10- sh backup.sh
10+ echo You need to set up SCHEDULE env var
11+ exit 127
1112else
12- exec go-cron -s " $SCHEDULE " -p 1880 -- /bin/sh ./backup.sh
13- fi
13+ echo " ${SCHEDULE} /bin/sh /backup.sh" > /etc/crontab.backup
14+ exec supercronic -debug -prometheus-listen-address 0.0.0.0 /etc/crontab.backup
15+ fi
You can’t perform that action at this time.
0 commit comments