Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/Add healthcheck for Ghostfolio service (#2893)

Thomas Dietrich5fc84a06cc67
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b7a81b289b..3d54c7ac39 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 91b2cd3e60..f72be00d73 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 933b4bc820..2ac90b7c14 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 e103a71ebf..007a468831 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: