From 7567941e6ccfc50304ae9105cf822ab8047f2e98 Mon Sep 17 00:00:00 2001 From: Clivern Date: Sun, 16 Jul 2023 23:13:36 +0200 Subject: [PATCH] init --- Dockerfile | 8 +++++--- src/main/kotlin/com/clivern/osaka/OsakaApplication.kt | 2 +- .../com/clivern/osaka/controller/HealthController.kt | 4 ++-- .../kotlin/com/clivern/osaka/controller/HomeController.kt | 2 +- .../com/clivern/osaka/controller/ReadyController.kt | 2 +- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7d3d161..01a93bf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ -FROM gradle:8.10-jdk22 as builder +FROM gradle:8.10-jdk17 as builder + +RUN apt-get update -y && apt-get upgrade -y COPY --chown=gradle:gradle . /home/gradle/src WORKDIR /home/gradle/src -RUN ./gradlew build --info +RUN ./gradlew clean build FROM openjdk:22-jdk-slim @@ -15,7 +17,7 @@ RUN mkdir -p /app/storage VOLUME /app/storage COPY --from=builder /home/gradle/src/build/libs/osaka-0.0.1.jar /app/releases/osaka-0.0.1.jar -COPY --from=builder /home/gradle/src/main/resources/application.properties /app/configs/application.properties +COPY --from=builder /home/gradle/src/src/main/resources/application.properties /app/configs/application.properties EXPOSE 8080 diff --git a/src/main/kotlin/com/clivern/osaka/OsakaApplication.kt b/src/main/kotlin/com/clivern/osaka/OsakaApplication.kt index 8ba1a92..0a6142a 100644 --- a/src/main/kotlin/com/clivern/osaka/OsakaApplication.kt +++ b/src/main/kotlin/com/clivern/osaka/OsakaApplication.kt @@ -27,8 +27,8 @@ package com.clivern.osaka -import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.boot.runApplication +import org.springframework.boot.autoconfigure.SpringBootApplication @SpringBootApplication class OsakaApplication diff --git a/src/main/kotlin/com/clivern/osaka/controller/HealthController.kt b/src/main/kotlin/com/clivern/osaka/controller/HealthController.kt index 2d8f7cb..5c273f8 100644 --- a/src/main/kotlin/com/clivern/osaka/controller/HealthController.kt +++ b/src/main/kotlin/com/clivern/osaka/controller/HealthController.kt @@ -27,13 +27,13 @@ package com.clivern.osaka.controller +import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RestController -import org.springframework.http.ResponseEntity @RestController class HealthController { - + data class HealthStatus ( val status: String ) diff --git a/src/main/kotlin/com/clivern/osaka/controller/HomeController.kt b/src/main/kotlin/com/clivern/osaka/controller/HomeController.kt index b5f53ff..f113e05 100644 --- a/src/main/kotlin/com/clivern/osaka/controller/HomeController.kt +++ b/src/main/kotlin/com/clivern/osaka/controller/HomeController.kt @@ -27,9 +27,9 @@ package com.clivern.osaka.controller +import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RestController -import org.springframework.http.ResponseEntity @RestController class HomeController { diff --git a/src/main/kotlin/com/clivern/osaka/controller/ReadyController.kt b/src/main/kotlin/com/clivern/osaka/controller/ReadyController.kt index 5b9b932..e6f493f 100644 --- a/src/main/kotlin/com/clivern/osaka/controller/ReadyController.kt +++ b/src/main/kotlin/com/clivern/osaka/controller/ReadyController.kt @@ -27,9 +27,9 @@ package com.clivern.osaka.controller +import org.springframework.http.ResponseEntity import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RestController -import org.springframework.http.ResponseEntity @RestController class ReadyController {