Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianbatuto committed Jan 24, 2025
1 parent 19381e2 commit 40b62d2
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,34 +8,34 @@ WORKDIR /kotlin-spring/
RUN gradle clean build
WORKDIR /

FROM openjdk:24-slim-bookworm
# FROM openjdk:24-slim-bookworm

ARG APP=/usr/src/app
ENV APP=/usr/src/app
# ARG APP=/usr/src/app
# ENV APP=/usr/src/app

RUN apt update
RUN apt install -y ca-certificates tzdata curl tini iputils-ping netcat-openbsd
RUN rm -rf /var/lib/apt/lists/*
# RUN apt update
# RUN apt install -y ca-certificates tzdata curl tini iputils-ping netcat-openbsd
# RUN rm -rf /var/lib/apt/lists/*

ENV TZ=Etc/UTC \
APP_USER=appuser
# ENV TZ=Etc/UTC \
# APP_USER=appuser

RUN groupadd $APP_USER \
&& useradd -g $APP_USER $APP_USER \
&& mkdir -p ${APP}
# RUN groupadd $APP_USER \
# && useradd -g $APP_USER $APP_USER \
# && mkdir -p ${APP}

COPY --from=builder /kotlin-spring/build/libs/ ${APP}/kotlin-spring/build/libs/
# COPY --from=builder /kotlin-spring/build/libs/ ${APP}/kotlin-spring/build/libs/

RUN chown -R $APP_USER:$APP_USER ${APP}
# RUN chown -R $APP_USER:$APP_USER ${APP}

USER $APP_USER
WORKDIR ${APP}
# USER $APP_USER
# WORKDIR ${APP}

COPY healthcheck.sh /
COPY start-app.sh /
# COPY healthcheck.sh /
# COPY start-app.sh /

EXPOSE 8080
# EXPOSE 8080

ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["/start-app.sh"]
HEALTHCHECK --interval=1s --timeout=5s --start-period=1s --retries=90 CMD /healthcheck.sh
# ENTRYPOINT ["/usr/bin/tini", "--"]
# CMD ["/start-app.sh"]
# HEALTHCHECK --interval=1s --timeout=5s --start-period=1s --retries=90 CMD /healthcheck.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

group = "org.hyperledger.cactus.plugin.ledger.connector.corda.server"
version = project.properties["version"]!!
Expand All @@ -7,7 +9,7 @@ val corda_release_group = "net.corda"
val corda_core_release_group = "net.corda"
val corda_release_version = "4.12"
val corda_core_release_version = "4.12"
val spring_boot_version = "3.3.1"
val spring_boot_version = "3.4.1"
val jackson_version = "2.16.1"

tasks.named<Test>("test") {
Expand All @@ -21,7 +23,7 @@ buildscript {
maven { url = uri("https://jitpack.io") }
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:3.3.1")
classpath("org.springframework.boot:spring-boot-gradle-plugin:3.4.1")
}
}

Expand All @@ -31,20 +33,24 @@ repositories {
maven { url = uri("https://jitpack.io") }
}

tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString()
tasks.withType<KotlinJvmCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_17)
}
}

plugins {
val kotlinVersion = "1.9.24"
val kotlinVersion = "2.1.0"
id("org.jetbrains.kotlin.jvm") version kotlinVersion
id("org.springframework.boot") version "3.3.1"
id("org.springframework.boot") version "3.4.1"
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
implementation("org.springframework:spring-core:$spring_boot_version")
implementation("org.springframework:spring-context:$spring_boot_version")
implementation("org.springframework.boot:spring-boot-starter-web:$spring_boot_version")
implementation("org.springframework.boot:spring-boot-starter-validation:$spring_boot_version")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 40b62d2

Please sign in to comment.