From 22d90a57f5845c02434ad5b9f18bc5dd03558a6a Mon Sep 17 00:00:00 2001 From: 1e99 Date: Mon, 16 Dec 2024 16:17:23 +0100 Subject: [PATCH] dockerfile for server --- Dockerfile | 8 ++++++++ mod-fabric/src/eu/e99/pixelchat/fabric/PixelChat.java | 4 ++-- server/Dockerfile | 0 server/build.gradle | 10 ++++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 Dockerfile delete mode 100644 server/Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8d9b576 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM eclipse-temurin:21-jdk-alpine AS builder +WORKDIR /src +COPY . ./ +RUN chmod +x ./gradlew && ./gradlew :server:shadowJar + +FROM eclipse-temurin:21-jdk-alpine AS runner +COPY --from=builder /src/server/build/libs/*-all.jar /bin/pixelchat.jar +CMD ["java", "-jar", "/bin/pixelchat.jar"] diff --git a/mod-fabric/src/eu/e99/pixelchat/fabric/PixelChat.java b/mod-fabric/src/eu/e99/pixelchat/fabric/PixelChat.java index 0a2f807..c27d396 100644 --- a/mod-fabric/src/eu/e99/pixelchat/fabric/PixelChat.java +++ b/mod-fabric/src/eu/e99/pixelchat/fabric/PixelChat.java @@ -19,8 +19,8 @@ public class PixelChat implements ClientModInitializer { UPLOADS = new ImageUploads( MinecraftClient.getInstance(), new ImageUploader[]{ - new PixelChatUploader("http", "localhost", 3001), - new PixelChatUploader("http", "localhost", 3000) + new PixelChatUploader("https", "pc.1e99.eu", 443), + new PixelChatUploader("https", "localhost", 443) } ); } diff --git a/server/Dockerfile b/server/Dockerfile deleted file mode 100644 index e69de29..0000000 diff --git a/server/build.gradle b/server/build.gradle index ec97e00..2824727 100644 --- a/server/build.gradle +++ b/server/build.gradle @@ -1,4 +1,5 @@ plugins { + id 'com.gradleup.shadow' version '9.0.0-beta4' id 'java' } @@ -19,3 +20,12 @@ sourceSets { main.java.srcDirs = ['src'] main.resources.srcDirs = ['resources'] } + + +jar { + manifest { + attributes( + 'Main-Class': 'eu.e99.pixelchat.server.Main' + ) + } +}