Skip to content

Commit

Permalink
Add healthcheck to featureflagservice (open-telemetry#661)
Browse files Browse the repository at this point in the history
* Add healthcheck to featureflagservice

In order to assess the health of this central service, compose should perform a check on the service.

* Add changelog entry

Co-authored-by: Juliano Costa <[email protected]>
Co-authored-by: Carter Socha <[email protected]>
  • Loading branch information
3 people authored Jan 19, 2023
1 parent 1e91267 commit bc2b204
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/featureflagservice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bc2b204

Please sign in to comment.