We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3011a87 commit 39d3991Copy full SHA for 39d3991
Dockerfile
@@ -41,4 +41,7 @@ RUN mkdir /backup && \
41
42
VOLUME ["/backup"]
43
44
-CMD dockerize -wait tcp://${MYSQL_HOST}:${MYSQL_PORT} -timeout ${TIMEOUT} /run.sh
+HEALTHCHECK --interval=2s --retries=1800 \
45
+ CMD stat /HEALTLY.status || exit 1
46
+
47
+ENTRYPOINT dockerize -wait tcp://${MYSQL_HOST}:${MYSQL_PORT} -timeout ${TIMEOUT} /run.sh
run.sh
@@ -14,6 +14,8 @@ elif [ -n "${INIT_RESTORE_LATEST}" ]; then
14
find /backup -maxdepth 1 -name '*.sql.gz' | tail -1 | xargs /restore.sh
15
fi
16
17
+touch /HEALTLY.status
18
19
echo "${CRON_TIME} /backup.sh >> /mysql_backup.log 2>&1" > /tmp/crontab.conf
20
crontab /tmp/crontab.conf
21
echo "=> Running cron task manager in foreground"
0 commit comments