-
Notifications
You must be signed in to change notification settings - Fork 1
/
minecraft-server.nomad
104 lines (98 loc) · 1.87 KB
/
minecraft-server.nomad
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
job "minecraft" {
constraint {
attribute = "${attr.kernel.name}"
value = "linux"
}
datacenters = ["dc1"]
meta {
Customer = "Kids"
For = "Fun"
}
priority = 20
update {
}
// constraint {
// java version
// }
all_at_once = true
affinity {
attribute = "${attr.cpu.numcores}"
operator = ">="
value = "3"
weight = 90
}
reschedule {
attempts = 1
interval = "15s"
delay = "10s"
unlimited = false
}
group "server" {
restart {
attempts = 1
delay = "10s"
}
network {
port "server" {
static = 25565
}
}
service {
tags = ["minecraft", "server"]
port = "server"
check {
type = "tcp"
port = "server"
interval = "10s"
timeout = "5s"
}
}
task "main" {
resources {
cpu = 3000
memory = 2048
}
driver = "java"
config {
jar_path = "local/paper.jar"
jvm_options = ["-Xmx2048M", "-Xms2048M"]
args = ["--nogui"]
}
artifact {
destination = "local/paper.jar"
source = "https://api.papermc.io/v2/projects/paper/versions/1.19.2/builds/153/downloads/paper-1.19.2-153.jar"
mode = "file"
}
template {
destination = "eula.txt"
data = "eula=true"
perms = "666"
}
// template {
// destination = "server.properties"
// data = <<EOF
// allow-nether=true
// difficulty=1
// gamemode=0
// hellworld=false
// level-name=world
// max-connections=3
// max-players=16
// motd=Welcome to my Minecraft Server\!
// online-mode=true
// port=25565
// public=false
// pvp=true
// server-name=Minecraft Server
// spawn-animals=true
// spawn-monsters=true
// verify-names=true
// view-distance=10
// EOF
// perms = "666"
// uid = 65534
// guid = 65534
//}
}
}
}