Skip to content

Commit

Permalink
GH-1960 Use JDK21 in official Docker image and make sure Loom is disa…
Browse files Browse the repository at this point in the history
…bled in Javalin
  • Loading branch information
dzikoysk committed Dec 23, 2023
1 parent 96ca008 commit 9aab648
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -94,6 +95,7 @@ internal object JavalinConfiguration {
}

private fun configureJavalin(config: JavalinConfig, localConfiguration: LocalConfiguration, webSettings: Reference<WebSettings>) {
ConcurrencyUtil.useLoom = false
config.showJavalinBanner = false
config.http.asyncTimeout = 10.minutes.inWholeMilliseconds
config.contextResolver.ip = { it.header(webSettings.get().forwardedIp) ?: it.req().remoteAddr }
Expand Down

0 comments on commit 9aab648

Please sign in to comment.