dockerisation

This commit is contained in:
2026-01-18 17:14:51 +01:00
parent dcb08a5e84
commit 344e328c25
6 changed files with 73 additions and 50 deletions

20
kiszolgalo/Dockerfile Normal file
View File

@@ -0,0 +1,20 @@
# Stage 1: Cache Gradle dependencies
FROM gradle:9.1.0-jdk21 AS build
RUN mkdir -p /home/gradle/cache_home
ENV GRADLE_USER_HOME=/home/gradle/cache_home
COPY build.gradle.* gradle.properties /home/gradle/app/
COPY gradle /home/gradle/app/gradle
WORKDIR /home/gradle/app
RUN gradle dependencies --no-daemon
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
# and boot JAR by default.
RUN gradle buildFatJar --no-daemon
# Stage 2: Create the Runtime Image
FROM amazoncorretto:21 AS runtime
EXPOSE 8080
RUN mkdir /app
COPY --from=build /home/gradle/src/build/libs/*.jar /app/ktor-docker-sample.jar
ENTRYPOINT ["java","-jar","/app/ktor-docker-sample.jar"]

View File

@@ -0,0 +1,6 @@
services:
backup-scheduler:
image: kotlin:latest
container_name: "bs"
ports:
- "8080:80"

View File

@@ -12,7 +12,7 @@ import kotlin.random.Random
//átlagos JAVA alapú fejlesztő //átlagos JAVA alapú fejlesztő
val httpPort: Int = System.getenv("HTTP_PORT")?.toInt() ?: 8080 val httpPort: Int = System.getenv("HTTP_PORT")?.toInt() ?: 80
val resourcesPath: String = System.getenv("RESOURCES") ?: "src/main/resources/" val resourcesPath: String = System.getenv("RESOURCES") ?: "src/main/resources/"
@@ -30,6 +30,7 @@ object ConversationHandler {
return num return num
} }
} }
fun listAllConversations(): String fun listAllConversations(): String
{ {
val stringBuilder = StringBuilder() val stringBuilder = StringBuilder()
@@ -39,6 +40,8 @@ object ConversationHandler {
stringBuilder.append(conversation.list()) stringBuilder.append(conversation.list())
} }
println(stringBuilder.toString())
return stringBuilder.toString() return stringBuilder.toString()
} }

View File

@@ -8,12 +8,11 @@
</head> </head>
<body> <body>
<div class="main-flexbox"> <div class="main-flexbox">
<header class="navbar"> <header class="navbar">
<a href="https://sc0tt.org/" style="float: left" target="_blank">Sc0tt főoldal</a> <a href="https://sc0tt.org/" style="float: left" target="_blank">Sc0tt főoldal</a>
<a href="/resources/about.html" style="float: left">About</a> <a href="/" style="float: left">Lets ask some shit bayBEE</a>
<img src="resources/logo.png" alt=logo" style="float: right;"> <img src="resources/logo.png" alt=logo" style="float: right;">
@@ -63,9 +62,6 @@
<h2 style="font-style: italic;">,,You make soup in a big bowl. You serve it in a smaller bowl. And then you convey it, using a spoon, to your mouth. But what is the spoon? Simply a smaller bowl still"</h2> <h2 style="font-style: italic;">,,You make soup in a big bowl. You serve it in a smaller bowl. And then you convey it, using a spoon, to your mouth. But what is the spoon? Simply a smaller bowl still"</h2>
<h3>-user 'autophage' on tumblr</h3> <h3>-user 'autophage' on tumblr</h3>
</div> </div>
</div> </div>
</body> </body>
</html> </html>

View File

@@ -57,7 +57,7 @@
}) })
.then(data => { .then(data => {
document.getElementById("messages").innerHTML = data + '<footer> <div class="textbox"><input class="text_input" name="valami" type="text" id="promptText" placeholder="answ"><button class="send_button" onclick="send_data()">send</button></div></footer>'; document.getElementById("messages").innerHTML = data + '<footer> <div class="textbox"><input class="text_input" name="valami" type="text" id="promptText" placeholder="answ"><button class="send_button" onclick="send_data()">send</button><button class="send_button" onclick="open_message(' + answid + ')">reload</button></div></footer>';
console.log(data.body) console.log(data.body)
}) })

View File

@@ -21,10 +21,10 @@ body {
display: flex; display: flex;
margin: auto; margin: auto;
text-align: center; text-align: center;
box-sizing: border-box; box-sizing: border-box;*/
justify-content: center;*/ justify-content: center;
flex-direction: column; flex-direction: column;
height: 93vh; height: 80vh;
overflow-y: scroll; overflow-y: scroll;
flex-grow: 8 flex-grow: 8
@@ -153,8 +153,6 @@ footer {
padding: 10px; padding: 10px;
background: #212121; background: #212121;
bottom: 0; bottom: 0;
background: green;
} }
.navbar a { .navbar a {