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
2
2
LABEL maintainer=
"Fedor Borshev <[email protected] >"
3
3
4
4
RUN 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
6
6
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
8
7
9
8
ENV POSTGRES_DATABASE **None**
10
9
ENV POSTGRES_HOST **None**
@@ -24,5 +23,7 @@ ENV SCHEDULE **None**
24
23
ADD entrypoint.sh .
25
24
ADD backup.sh .
26
25
26
+ HEALTHCHECK CMD curl --fail http://localhost:9746/health || exit 1
27
+
27
28
ENTRYPOINT ["/usr/bin/dumb-init" , "--" ]
28
29
CMD ["sh" , "entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ if [ "${S3_S3V4}" = "yes" ]; then
7
7
fi
8
8
9
9
if [ " ${SCHEDULE} " = " **None**" ]; then
10
- sh backup.sh
10
+ echo You need to set up SCHEDULE env var
11
+ exit 127
11
12
else
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