Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Upcoming Version / (WIP)
==================

Improvements:
* Stabilized consul registration and health checks

1.1.0 / 2025-11-27
==================

Expand Down
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ FROM openlmis/service-base:7
COPY build/libs/*.jar /service.jar
COPY src/main/resources/db/demo-data/*.csv /demo-data/
COPY build/schema /schema

COPY build/consul /consul
WORKDIR /consul

RUN npm install --production

WORKDIR /
5 changes: 3 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ repositories {
}

dependencies {
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-starter-data-jpa"
compile "org.springframework.boot:spring-boot-starter-data-rest"
compile "org.springframework.boot:spring-boot-starter-web"
Expand Down Expand Up @@ -238,15 +239,15 @@ apply from: "registration.gradle"
assemble {
dependsOn ramlToHtml
dependsOn copyRamlHtmlToBuild
dependsOn copyConsulRegistrationToBuild
dependsOn prepareConsulBuild
dependsOn jacocoTestReport
}

check {
dependsOn ramlToHtml
dependsOn copyRamlHtmlToBuild
dependsOn integrationTest
dependsOn copyConsulRegistrationToBuild
dependsOn prepareConsulBuild
}

build {
Expand Down
12 changes: 10 additions & 2 deletions consul/config.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
{
"service": {
"Name": "buq",
"Id": "buq-service",
"Port": 8080,
"Tags": ["openlmis-service"]
"Tags": ["openlmis-service"],
"check": {
"interval": "10s",
"http": "http://HOST:PORT/actuator/health",
"timeout": "5s",
"deregisterCriticalServiceAfter": "10m"
}
},
"raml": "src/main/resources/api-definition.yaml",
"raml": "/consul/api-definition.yaml",
"path": [
"buq",
"buq/docs",
Expand All @@ -13,3 +20,4 @@
"buq/webjars/<all>"
]
}

24 changes: 13 additions & 11 deletions consul/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"name": "openlmis-consul-registration",
"version": "0.0.1",

"devDependencies":
{
"uuid": "~3.0.0",
"raml-parser": "~0.8.0",
"command-line-args": "~3.0.0",
"system-sleep": "~1.0.0",
"deasync": "~0.1.9",
"ip": "~1.1.0"
"version": "1.0.0",
"description": "Registration script for OpenLMIS Service",
"main": "registration.js",
"dependencies": {
"axios": "^1.6.0",
"command-line-args": "^5.2.1",
"ip": "^1.1.8",
"raml-parser": "~0.8.18",
"uuid": "^9.0.0"
},
"engines": {
"node": ">=18"
}
}
}
Loading