diff options
Diffstat (limited to '')
-rw-r--r-- | docker/Dockerfile | 2 | ||||
-rwxr-xr-x | docker/cgitize.sh | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 46a2215..8cd256d 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -49,3 +49,5 @@ ENTRYPOINT ["/sbin/tini", "--", "/in_cron.sh"] WORKDIR /usr/src CMD ["/cgitize.sh"] + +HEALTHCHECK --interval=5m --retries=3 CMD ! test -f /fail diff --git a/docker/cgitize.sh b/docker/cgitize.sh index 92fe43c..be33601 100755 --- a/docker/cgitize.sh +++ b/docker/cgitize.sh @@ -14,6 +14,7 @@ readonly script_dir readonly src_dir=/usr/src readonly cfg_path=/etc/cgitize/cgitize.toml +readonly fail_path=/fail secure_repo_dir() { local dir @@ -29,11 +30,13 @@ secure_repo_dir() { setup() { secure_repo_dir + touch -- "$fail_path" } run() { cd -- "$src_dir" - exec python3 -m cgitize.main "$@" + python3 -m cgitize.main "$@" + rm -f -- "$fail_path" } main() { |