From e879a168439ce79792f1fbab775e7b7c78158834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=99=A9=EC=9C=A4=EC=84=B1?= <87403078+hys0star@users.noreply.github.com> Date: Tue, 26 Oct 2021 17:14:25 +0900 Subject: [PATCH] Add healthcheck for docker-compose + autoheal for auto restart --- Installation.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Installation.md b/Installation.md index 34ee247..064978e 100644 --- a/Installation.md +++ b/Installation.md @@ -88,8 +88,20 @@ services: https_only: false domain: # external_port: + healthcheck: + test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1 + interval: 30s + timeout: 5s + retries: 2 depends_on: - postgres + autoheal: + restart: always + image: willfarrell/autoheal + environment: + - AUTOHEAL_CONTAINER_LABEL=all + volumes: + - /var/run/docker.sock:/var/run/docker.sock volumes: postgresdata: