From 5fc84a06cc67f8b6f06291343b11d93f36ddd95c Mon Sep 17 00:00:00 2001 From: Thomas Dietrich Date: Sun, 21 Jan 2024 11:48:32 +0100 Subject: [PATCH] Feature/Add healthcheck for Ghostfolio service (#2893) * Add curl to Dockerfile image * Add healthcheck to docker-compose.yml and docker-compose.build.yml * Update changelog --- CHANGELOG.md | 6 ++++++ Dockerfile | 3 ++- docker/docker-compose.build.yml | 5 +++++ docker/docker-compose.yml | 5 +++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7a81b289..3d54c7ac3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased + +### Added + +- Added `healthcheck` for the _Ghostfolio_ service to the `docker-compose` files (`docker-compose.yml` and `docker-compose.build.yml`) + ## 2.42.0 - 2024-01-21 ### Added diff --git a/Dockerfile b/Dockerfile index 91b2cd3e6..f72be00d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,9 @@ COPY ./.yarnrc .yarnrc COPY ./prisma/schema.prisma prisma/schema.prisma RUN apt update && apt install -y \ - git \ + curl \ g++ \ + git \ make \ openssl \ python3 \ diff --git a/docker/docker-compose.build.yml b/docker/docker-compose.build.yml index 933b4bc82..2ac90b7c1 100644 --- a/docker/docker-compose.build.yml +++ b/docker/docker-compose.build.yml @@ -16,6 +16,11 @@ services: condition: service_healthy redis: condition: service_healthy + healthcheck: + test: ['CMD-SHELL', 'curl -f http://localhost:3333/api/v1/health'] + interval: 10s + timeout: 5s + retries: 5 postgres: image: postgres:15 env_file: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index e103a71eb..007a46883 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -16,6 +16,11 @@ services: condition: service_healthy redis: condition: service_healthy + healthcheck: + test: ['CMD-SHELL', 'curl -f http://localhost:3333/api/v1/health'] + interval: 10s + timeout: 5s + retries: 5 postgres: image: postgres:15 env_file: