Add Java runtime blueprint and metadata (#332)

* Add Java runtime blueprint and metadata

Introduces a new Java blueprint with Docker Compose, template configuration, and logo for multi-version Java environments. Updates meta.json to register the Java runtime, supporting versions 8-21 for use cases like Minecraft servers and Spring Boot apps.

* Move Java Runtime entry in meta.json

Relocated the Java Runtime (Multi-Version) entry within meta.json for improved organization. No changes to the entry's content.

* Update template.toml
This commit is contained in:
devdamo
2025-09-04 07:00:55 +01:00
committed by GitHub
parent 8d6fc02d55
commit 89528e7b8a
4 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
services:
java-app:
image: ghcr.io/pterodactyl/yolks:java_${JAVA_VERSION}
restart: unless-stopped
stdin_open: true
tty: true
volumes:
- app-data:/home/container
working_dir: /home/container
environment:
- STARTUP=${STARTUP_COMMAND}
- SERVER_JARFILE=${SERVER_JARFILE}
- JAVA_VERSION=${JAVA_VERSION}
ports:
- ${SERVER_PORT}
user: container
volumes:
app-data: {}

BIN
blueprints/java/java.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,29 @@
[variables]
java_version = "21"
server_port = "25565"
startup_command = "java -Xmx1024M -Xms512M -jar server.jar nogui"
server_jarfile = "server.jar"
[config]
[[config.domains]]
serviceName = "java-app"
port = 25565
host = "${domain}"
[config.env]
JAVA_VERSION = "${java_version}"
SERVER_PORT = "${server_port}"
STARTUP_COMMAND = "${startup_command}"
SERVER_JARFILE = "${server_jarfile}"
[[config.mounts]]
filePath = "/home/container/server.properties"
content = """
# Minecraft server properties
server-port=25565
motd=Java Server powered by Dokploy
online-mode=true
difficulty=easy
gamemode=survival
max-players=20
"""