Skip to content

Commit

Permalink
MCP-1153 Health Check for Lighthouse Service Container (#933)
Browse files Browse the repository at this point in the history
* health check for lighthouse service container

* correct the end point for health check

* eol last line

Co-authored-by: Afsin Ustundag <[email protected]>
Co-authored-by: dimitri-amida <[email protected]>
  • Loading branch information
3 people authored Jan 12, 2023
1 parent 44dc159 commit bd306f5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
2 changes: 2 additions & 0 deletions svc-lighthouse-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ dependencies {
implementation "com.fasterxml.jackson.core:jackson-databind:${jackson_databind_version}"
implementation "com.fasterxml.jackson.core:jackson-core:${jackson_version}"
implementation 'org.springframework.boot:spring-boot-starter-amqp'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework:spring-web:5.3.23'
implementation 'ca.uhn.hapi.fhir:hapi-fhir-base:6.2.4'
implementation('ca.uhn.hapi.fhir:hapi-fhir-server-openapi:6.2.4') {
Expand Down
5 changes: 4 additions & 1 deletion svc-lighthouse-api/src/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM eclipse-temurin:17-jre-alpine
LABEL org.opencontainers.image.source=https://github.com/department-of-veterans-affairs/abd-vro

RUN apk update && apk --no-cache add expat=2.5.0-r0
# hadolint ignore=DL3018
RUN apk update && apk --no-cache add expat=2.5.0-r0 curl

ARG JAR_FILE
ARG ENTRYPOINT_FILE
Expand All @@ -11,6 +12,8 @@ COPY ${ENTRYPOINT_FILE} entrypoint.sh
RUN chmod +x entrypoint.sh
COPY ${JAR_FILE} service-data-access.jar

HEALTHCHECK CMD curl --fail http://localhost:8081/actuator/health || exit 1

RUN adduser --no-create-home --disabled-password docker
USER docker
CMD ["sh", "entrypoint.sh"]
31 changes: 15 additions & 16 deletions svc-lighthouse-api/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,7 @@ spring.profiles.group.sandbox=nonprod,k8s
# For prod, only load application-prod.properties and application-k8s.properties, if they exist
spring.profiles.group.prod=k8s

## Common settings

spring.main.web-application-type=none

spring.servlet.multipart.max-file-size=25MB
spring.servlet.multipart.max-request-size=25MB
spring.servlet.multipart.enabled=true

server.max-http-header-size=48000
server.tomcat.max-http-form-post-size=26214400
server.tomcat.max-http-post-size=26214400
server.tomcat.max-swallow-size=26214400
server.servlet.session.timeout=60000
server.session.timeout=60
server.connection.timeout=60000
## RabbitMQ Settings

spring.rabbitmq.host=${RABBITMQ_PLACEHOLDERS_HOST}
spring.rabbitmq.port=5672
Expand All @@ -45,6 +31,19 @@ abd-data-access.rabbitmq.claim-submit-exchange=claim-submit-exchange
abd-data-access.rabbitmq.claim-submit-queue=claim-submit
abd-data-access.rabbitmq.claim-submit-routing-key=code.#

# Lighthouse FHIR API
## Lighthouse FHIR API

lh.clientId=${LH_ACCESS_CLIENT_ID}
lh.pemkey=${LH_PRIVATE_KEY}

## Health

management.endpoint.health.show-details=always
management.endpoint.health.enabled=true
management.endpoint.health.probes.enabled=true
management.endpoint.health.group.liveness.include=livenessState
management.endpoint.health.group.readiness.include=readinessState

management.endpoints.enabled-by-default=false
management.endpoints.web.exposure.include=health
management.server.port=8081

0 comments on commit bd306f5

Please sign in to comment.