From be060cbfb7d9f5e31a318c3ff3503f3c951d6d65 Mon Sep 17 00:00:00 2001 From: Ruben Talstra Date: Mon, 3 Mar 2025 20:41:01 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=80=20feat:=20Add=20healthcheck=20conf?= =?UTF-8?q?iguration=20for=20API=20service=20in=20docker-compose.yml=20#61?= =?UTF-8?q?48?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index e16f93f4c0..4206d3369c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ # Do not edit this file directly. Use a ‘docker-compose.override.yaml’ file if you can. -# Refer to `docker-compose.override.yaml.example’ for some sample configurations. +# Refer to `docker-compose.override.yaml.example` for some sample configurations. services: api: @@ -27,6 +27,13 @@ services: - ./images:/app/client/public/images - ./uploads:/app/uploads - ./logs:/app/api/logs + healthcheck: + test: ["CMD", "curl", "-f", "http://api:${PORT}/health || exit 1"] + interval: 30s + timeout: 10s + retries: 5 + start_period: 10s + mongodb: container_name: chat-mongodb image: mongo