From 185a2fb635ee9060e23bd3e060532dfb1f48dcf7 Mon Sep 17 00:00:00 2001 From: "Kevin Veen-Birkenbach [aka. Frantz]" Date: Fri, 21 Jan 2022 18:09:56 +0100 Subject: [PATCH] Added healthcheck for docker --- roles/docker-mailu/templates/docker-compose.yml.j2 | 5 +++++ roles/docker-nextcloud/templates/docker-compose.yml.j2 | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/roles/docker-mailu/templates/docker-compose.yml.j2 b/roles/docker-mailu/templates/docker-compose.yml.j2 index 4aa1d938..5188625e 100644 --- a/roles/docker-mailu/templates/docker-compose.yml.j2 +++ b/roles/docker-mailu/templates/docker-compose.yml.j2 @@ -9,6 +9,11 @@ services: env_file: mailu.env volumes: - "redis_data:/data" + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 1s + timeout: 3s + retries: 30 database: image: mariadb restart: always diff --git a/roles/docker-nextcloud/templates/docker-compose.yml.j2 b/roles/docker-nextcloud/templates/docker-compose.yml.j2 index 40f79e8e..102e5522 100644 --- a/roles/docker-nextcloud/templates/docker-compose.yml.j2 +++ b/roles/docker-nextcloud/templates/docker-compose.yml.j2 @@ -51,6 +51,11 @@ services: restart: always volumes: - redis:/data + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 1s + timeout: 3s + retries: 30 cron: image: "nextcloud:{{nextcloud_version}}-fpm-alpine" restart: always