From 9aab64882941eb25c5743b8932c6dbfbfae5aea0 Mon Sep 17 00:00:00 2001 From: dzikoysk Date: Sat, 23 Dec 2023 21:42:42 +0100 Subject: [PATCH] GH-1960 Use JDK21 in official Docker image and make sure Loom is disabled in Javalin --- Dockerfile | 4 ++-- .../com/reposilite/web/application/JavalinConfiguration.kt | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 65babb12a..6da75680b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build stage -FROM openjdk:20-slim AS build +FROM openjdk:21-slim AS build COPY . /home/reposilite-build WORKDIR /home/reposilite-build RUN \ @@ -26,7 +26,7 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.schema-version="1.0" # Run stage -FROM openjdk:20-slim +FROM openjdk:21-slim RUN mkdir -p /app/data && mkdir -p /var/log/reposilite VOLUME /app/data WORKDIR /app diff --git a/reposilite-backend/src/main/kotlin/com/reposilite/web/application/JavalinConfiguration.kt b/reposilite-backend/src/main/kotlin/com/reposilite/web/application/JavalinConfiguration.kt index 9b95e31d8..ea6d7a117 100644 --- a/reposilite-backend/src/main/kotlin/com/reposilite/web/application/JavalinConfiguration.kt +++ b/reposilite-backend/src/main/kotlin/com/reposilite/web/application/JavalinConfiguration.kt @@ -52,6 +52,7 @@ import io.javalin.json.JavalinJackson import io.javalin.openapi.plugin.OpenApiPlugin import io.javalin.openapi.plugin.OpenApiPluginConfiguration import io.javalin.plugin.bundled.SslRedirectPlugin +import io.javalin.util.ConcurrencyUtil import kotlin.time.Duration.Companion.minutes import org.eclipse.jetty.server.Server import org.eclipse.jetty.server.ServerConnector @@ -94,6 +95,7 @@ internal object JavalinConfiguration { } private fun configureJavalin(config: JavalinConfig, localConfiguration: LocalConfiguration, webSettings: Reference) { + ConcurrencyUtil.useLoom = false config.showJavalinBanner = false config.http.asyncTimeout = 10.minutes.inWholeMilliseconds config.contextResolver.ip = { it.header(webSettings.get().forwardedIp) ?: it.req().remoteAddr }