This repository has been archived by the owner on Mar 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathAcornfile
63 lines (59 loc) · 1.56 KB
/
Acornfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
args: {
// This must be TRUE to accept the EULA
eula: "TRUE"
// Mode: "creative or survival"
mode: *"creative" | "survival"
// Difficulty
difficulty: "peaceful"
// Allow Flight
allowFlight: *"TRUE" | "FALSE"
// Enable GeyserMC
geyser: false
}
containers: mc: {
image: "itzg/minecraft-server"
ports: publish: std.ifelse(args.geyser, [ "25565:25565/tcp", "19132:19132/udp", "19132:19132/tcp"], "25565:25565/tcp")
env: {
EULA: args.eula
MODE: args.mode
DIFFICULTY: args.difficulty
ALLOW_NETHER: "true"
GENERATE_STRUCTURES: "true"
ENABLE_COMMAND_BLOCK: "true"
SPAWN_ANIMALS: "true"
SPAWN_MONSTERS: "true"
SPAWN_NPCS: "true"
ALLOW_FLIGHT: args.allowFlight
VERSION: "1.20"
TYPE: localData.type
}
if args.geyser {
env: PLUGINS: "https://download.geysermc.org/v2/projects/geyser/versions/latest/builds/latest/downloads/spigot\nhttps://download.geysermc.org/v2/projects/floodgate/versions/latest/builds/latest/downloads/spigot"
}
dirs: "/data": "volume://mc-data"
probes: [{
type: "readiness"
exec: command: [
"/usr/local/bin/mc-monitor",
"status",
"--host",
"localhost",
]
initialDelaySeconds: 20
periodSeconds: 5
failureThreshold: 20
}, {
type: "liveness"
exec: command: [
"/usr/local/bin/mc-monitor",
"status",
"--host",
"localhost",
]
initialDelaySeconds: 120
periodSeconds: 60
}]
memory: 2048Mi
}
volumes: "mc-data": {}
localData: type: std.ifelse(args.geyser, "PAPER", "VANILLA")