Skip to content

Commit 6bfc680

Browse files
committed
Our own docker image for MC
1 parent 5ea9ff8 commit 6bfc680

3 files changed

Lines changed: 14 additions & 13 deletions

File tree

minecraft/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { ComposeConfig } from "../compose";
22
import { resolveSettings } from "../settings";
3-
import { buildMinecraftCompose } from "./install";
3+
import { buildMinecraftCompose, dockerImage } from "./install";
44
import { minecraftSettings } from "./settings";
55

66
const buildCompose = (config: ComposeConfig, raw: unknown): string =>
@@ -9,7 +9,7 @@ const buildCompose = (config: ComposeConfig, raw: unknown): string =>
99
export const minecraft = {
1010
buildCompose,
1111
description: "Minecraft is a sandbox game where you can build your own world.",
12-
dockerImage: minecraftSettings.dockerImage,
12+
dockerImage,
1313
enabled: true,
1414
gamedigId: "minecraft",
1515
id: "minecraft",

minecraft/install.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import type { ComposeConfig } from "../compose";
22
import { escapeComposeValue } from "../compose";
33
import type { MinecraftSettings } from "./settings";
44

5+
export const dockerImage = "ghcr.io/nodebytehosting/games:minecraft-latest"
6+
57
export const buildMinecraftCompose = (
68
config: ComposeConfig,
79
settings: MinecraftSettings,
@@ -13,7 +15,7 @@ export const buildMinecraftCompose = (
1315

1416
return `services:
1517
minecraft:
16-
image: ${settings.dockerImage}
18+
image: ${dockerImage}
1719
container_name: nodebyte-game
1820
ports:
1921
- "25565:25565"

minecraft/settings.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@ import { defineSettings } from "../settings";
22
import type { SettingsValues } from "../settings";
33

44
export const minecraftSettings = defineSettings({
5-
dockerImage: {
6-
default: "ghcr.io/pterodactyl/yolks:java_25",
7-
label: "Docker Image",
5+
javaVersion: {
6+
default: "25",
7+
label: "Java Version",
88
options: [
9-
{ value: "ghcr.io/pterodactyl/yolks:java_25" },
10-
{ value: "ghcr.io/pterodactyl/yolks:java_22" },
11-
{ value: "ghcr.io/pterodactyl/yolks:java_21" },
12-
{ value: "ghcr.io/pterodactyl/yolks:java_17" },
13-
{ value: "ghcr.io/pterodactyl/yolks:java_16" },
14-
{ value: "ghcr.io/pterodactyl/yolks:java_11" },
15-
{ value: "ghcr.io/pterodactyl/yolks:java_8" },
9+
{ value: "25" },
10+
{ value: "21" },
11+
{ value: "17" },
12+
{ value: "11" },
13+
{ value: "8" },
14+
1615
],
1716
type: "select",
1817
},

0 commit comments

Comments
 (0)