From 18d4c3c49dc9443fd93dd53185277c0296331d27 Mon Sep 17 00:00:00 2001 From: Cedric Ziel Date: Tue, 27 Dec 2022 10:37:13 +0100 Subject: [PATCH 1/2] Add healthcheck to featureflagservice In order to assess the health of this central service, compose should perform a check on the service. --- docker-compose.yml | 2 ++ src/featureflagservice/Dockerfile | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 900dc7d461..7d45c25f67 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -231,6 +231,8 @@ services: - OTEL_SERVICE_NAME=featureflagservice - DATABASE_URL=ecto://ffs:ffs@ffs_postgres:5432/ffs - FEATURE_FLAG_SERVICE_PATH_ROOT="/feature" + healthcheck: + test: ["CMD", "curl", "-H", "baggage: synthetic_request=true", "-f", "http://localhost:${FEATURE_FLAG_SERVICE_PORT}"] depends_on: ffs_postgres: condition: service_healthy diff --git a/src/featureflagservice/Dockerfile b/src/featureflagservice/Dockerfile index 7f3fc34e8c..21bb0f77ca 100644 --- a/src/featureflagservice/Dockerfile +++ b/src/featureflagservice/Dockerfile @@ -80,7 +80,7 @@ RUN mix release # the compiled release and other runtime necessities FROM ${RUNNER_IMAGE} -RUN apt-get update -y && apt-get install -y libstdc++6 openssl libncurses5 locales \ +RUN apt-get update -y && apt-get install -y libstdc++6 openssl libncurses5 locales curl \ && apt-get clean && rm -f /var/lib/apt/lists/*_* # Set the locale From fcfbc704f9bf0987bd55eec06779e2d95d321767 Mon Sep 17 00:00:00 2001 From: Cedric Ziel Date: Tue, 27 Dec 2022 10:38:52 +0100 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d122bb058e..85301a32c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -166,3 +166,5 @@ significant modifications will be credited to OpenTelemetry Authors. ([#648](https://github.com/open-telemetry/opentelemetry-demo/pull/648)) * Add Jaeger-SPM-Config ([#655](https://github.com/open-telemetry/opentelemetry-demo/pull/655)) +* Add healthcheck to featureflagservice +([#661](https://github.com/open-telemetry/opentelemetry-demo/pull/661)