diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b105e37bf..e9e15f6d4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -170,6 +170,8 @@ 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) * Add resource detectors to checkout service ([#662](https://github.com/open-telemetry/opentelemetry-demo/pull/662)) * Add resource detectors to cart service diff --git a/docker-compose.yml b/docker-compose.yml index d898ae28fa..0e79d211eb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -236,6 +236,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 dbe237825c..0f428ede04 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