Skip to content

Commit

Permalink
chore: add healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
brunopacheco1 committed Feb 28, 2024
1 parent 155c47d commit 5f12285
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 34 deletions.
19 changes: 0 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
# SPDX-FileCopyrightText: 2024 PNED G.I.E.
#
# SPDX-License-Identifier: Apache-2.0
####
# This Dockerfile is used in order to build a container that runs the Quarkus application in native (no JVM) mode.
# It uses a micro base image, tuned for Quarkus native executables.
# It reduces the size of the resulting container image.
# Check https://quarkus.io/guides/quarkus-runtime-base-image for further information about this image.
#
# Before building the container image run:
#
# mvn package -Dnative
#
# Then, build the image with:
#
# docker build -f src/main/docker/Dockerfile.native-micro -t quarkus/code-with-quarkus .
#
# Then run the container using:
#
# docker run -i --rm -p 8080:8080 quarkus/code-with-quarkus
#
###
FROM registry.access.redhat.com/ubi9-minimal:9.3
WORKDIR /work/
RUN chown 1001 /work \
Expand Down
5 changes: 5 additions & 0 deletions _http/daam/health_check.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
### SPDX-FileCopyrightText: 2024 PNED G.I.E.
###
### SPDX-License-Identifier: Apache-2.0

GET http://localhost:8080/q/health
27 changes: 12 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<?xml version="1.0"?>
<!--
SPDX-FileCopyrightText: 2024 Google LLC
SPDX-License-Identifier: Apache-2.0
-->
<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0"
Expand All @@ -14,7 +9,10 @@ SPDX-License-Identifier: Apache-2.0
<version>0.0.0</version>
<name>gdi-userportal-access-management-service</name>
<properties>
<assertj.version>3.25.3</assertj.version>
<checkstyle-maven-plugin.version>3.3.1</checkstyle-maven-plugin.version>
<compiler-plugin.version>3.12.1</compiler-plugin.version>
<lombok.version>1.18.30</lombok.version>
<maven.compiler.release>21</maven.compiler.release>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
Expand All @@ -23,9 +21,6 @@ SPDX-License-Identifier: Apache-2.0
<quarkus.platform.version>3.7.2</quarkus.platform.version>
<skipITs>true</skipITs>
<surefire-plugin.version>3.2.5</surefire-plugin.version>
<assertj.version>3.25.3</assertj.version>
<lombok.version>1.18.30</lombok.version>
<checkstyle-maven-plugin.version>3.3.1</checkstyle-maven-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
Expand Down Expand Up @@ -65,6 +60,10 @@ SPDX-License-Identifier: Apache-2.0
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-health</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
Expand Down Expand Up @@ -150,9 +149,8 @@ SPDX-License-Identifier: Apache-2.0
<inputSpec>${project.basedir}/src/main/resources/META-INF/openapi.yaml</inputSpec>
<generatorName>jaxrs-spec</generatorName>
<configOptions>
<additionalModelTypeAnnotations>
@lombok.Data @lombok.NoArgsConstructor @lombok.AllArgsConstructor @lombok.Builder
</additionalModelTypeAnnotations>
<additionalModelTypeAnnotations>@lombok.Data @lombok.NoArgsConstructor
@lombok.AllArgsConstructor @lombok.Builder</additionalModelTypeAnnotations>
<useTags>true</useTags>
<useJakartaEe>true</useJakartaEe>
<dateLibrary>java8</dateLibrary>
Expand Down Expand Up @@ -183,19 +181,18 @@ SPDX-License-Identifier: Apache-2.0
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${checkstyle-maven-plugin.version}</version>
<configuration>
<configLocation>google_checks.xml</configLocation>
</configuration>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<configLocation>google_checks.xml</configLocation>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
3 changes: 3 additions & 0 deletions pom.xml.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SPDX-FileCopyrightText: 2024 PNED G.I.E.

SPDX-License-Identifier: Apache-2.0

0 comments on commit 5f12285

Please sign in to comment.