We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 736f775 commit 2362b1bCopy full SHA for 2362b1b
docker/app/Dockerfile
@@ -0,0 +1,6 @@
1
+FROM eclipse-temurin:21-jdk-alpine
2
+WORKDIR /app
3
+EXPOSE 8082
4
+COPY my.jar my.jar
5
+ENV RUN_FROM_JAR true
6
+ENTRYPOINT ["java","-jar","my.jar"]
src/main/kotlin/no/java/moresleep/Application.kt
@@ -40,9 +40,11 @@ private fun createHandler(): Handler {
40
41
if (Setup.readBoolValue(SetupValue.RUN_FROM_JAR)) {
42
// Prod ie running from jar
43
+ println("Running from jar")
44
webAppContext.baseResource = Resource.newClassPathResource("webapp", true, false)
45
} else {
46
// Development ie running in ide
47
+ println("Running from local filesystem")
48
webAppContext.resourceBase = "src/main/resources/webapp"
49
}
50
0 commit comments