Skip to content

Commit

Permalink
Modld 40 (#4)
Browse files Browse the repository at this point in the history
* MODLD-40: docker and jenkins files

* MODLD-40: added prometheus with endpoints and disable open-in-view property
  • Loading branch information
PBobylev committed May 16, 2023
1 parent 9f125a5 commit b177306
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
*
!Dockerfile
!docker*
!mod-linked-data/target/*.jar
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM folioci/alpine-jre-openjdk17:latest

# Copy your fat jar to the container
ENV APP_FILE mod-linked-data-fat.jar
# - should be a single jar file
ARG JAR_FILE=./target/*.jar
# - copy
COPY ${JAR_FILE} ${JAVA_APP_DIR}/${APP_FILE}

# Expose this port locally in the container.
EXPOSE 8081
20 changes: 20 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
buildMvn {
publishModDescriptor = true
mvnDeploy = true
doKubeDeploy = true
doUploadApidocs = true
buildNode = 'jenkins-agent-java17'

doApiLint = true
doApiDoc = true
apiTypes = 'OAS'
apiDirectories = 'src/main/resources/swagger.api'

doDocker = {
buildDocker {
publishMaster = true
healthChk = false
healthChkCmd = 'wget --no-verbose --tries=1 --spider http://localhost:8081/admin/health || exit 1'
}
}
}
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@
<version>${hibernate-types.version}</version>
</dependency>

<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>

<!-- test -->
<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ spring:
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
open-in-view: false

folio:
environment: ${ENV:folio}
Expand All @@ -36,7 +37,7 @@ management:
endpoints:
web:
exposure:
include: info,health,liquibase,threaddump,heapdump,loggers
include: info,health,liquibase,threaddump,heapdump,loggers,env,httptrace,metrics,prometheus
base-path: /admin
endpoint:
loggers:
Expand Down

0 comments on commit b177306

Please sign in to comment.