forked from GuyBarros/nomad_jobs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
minecraft.nomad
46 lines (46 loc) · 1.07 KB
/
minecraft.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
job "minecraft" {
datacenters = ["EU-guystack"]
group "minecraft" {
volume "minecraft" {
type = "host"
source = "minecraft"
}
task "eula" {
driver = "exec"
config {
command = "mv"
args = ["local/eula.txt", "/var/volume/"]
}
lifecycle {
hook = "prestart"
sidecar = false
}
template {
data = "eula=true"
destination = "local/eula.txt"
}
volume_mount {
volume = "minecraft"
destination = "/var/volume"
}
}
task "minecraft" {
driver = "exec"
config {
command = "/bin/sh"
args = ["-c", "cd /var/volume && exec java -Xms1024M -Xmx2048M -jar /local/server.jar --nogui"]
}
artifact {
source = "https://launcher.mojang.com/v1/objects/bb2b6b1aefcd70dfd1892149ac3a215f6c636b07/server.jar"
}
resources {
cpu = 4000
memory = 2048
}
volume_mount {
volume = "minecraft"
destination = "/var/volume"
}
}
}
}