From 743fb8016da753cb709d27b3eccca868514c9638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20D=2E=20D=C3=ADaz?= Date: Fri, 3 May 2024 17:23:17 +0200 Subject: [PATCH] imp: healthchecks --- common.yaml.jinja | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/common.yaml.jinja b/common.yaml.jinja index 1004e625..da123e2b 100644 --- a/common.yaml.jinja +++ b/common.yaml.jinja @@ -31,6 +31,12 @@ services: traefik.frontend.passHostHeader: "true" traefik.port: "8069" {%- endif %} + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8069"] + interval: 45s + timeout: 15s + retries: 3 + start_period: 25s {% if postgres_version -%} db: @@ -43,6 +49,12 @@ services: work_mem = 512MB volumes: - db:/var/lib/postgresql/data:z + healthcheck: + test: ["CMD", "pg_isready"] + interval: 45s + timeout: 30s + retries: 3 + start_period: 25s {%- endif %} smtpfake: @@ -113,4 +125,10 @@ services: volumes: - backup_cache:/root:z - filestore:/mnt/backup/src/odoo:z + healthcheck: + test: ["CMD", "pg_isready"] + interval: 45s + timeout: 30s + retries: 3 + start_period: 25s {%- endif %}