dockerfile for server

This commit is contained in:
1e99 2024-12-16 16:17:23 +01:00
parent 470118ac1c
commit 22d90a57f5
4 changed files with 20 additions and 2 deletions

8
Dockerfile Normal file
View file

@ -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"]

View file

@ -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)
}
);
}

View file

View file

@ -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'
)
}
}