.
This commit is contained in:
parent
8f29a4f56d
commit
b7623bab85
8 changed files with 60 additions and 32 deletions
|
|
@ -1,77 +0,0 @@
|
|||
job "lobby" {
|
||||
type = "service"
|
||||
|
||||
group "lobby" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
mode = "bridge"
|
||||
port "minecraft" {
|
||||
to = 25565
|
||||
}
|
||||
dns {
|
||||
servers = ["172.17.0.1"]
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
name = "lobby"
|
||||
port = "minecraft"
|
||||
address_mode = "alloc"
|
||||
tags = ["minecraft"]
|
||||
check {
|
||||
type = "tcp"
|
||||
interval = "5s"
|
||||
timeout = "1s"
|
||||
}
|
||||
}
|
||||
|
||||
ephemeral_disk {
|
||||
size = 5000 # 5 gb
|
||||
}
|
||||
|
||||
task "download-plugins" {
|
||||
driver = "docker"
|
||||
|
||||
lifecycle {
|
||||
hook = "prestart"
|
||||
sidecar = false
|
||||
}
|
||||
|
||||
config {
|
||||
image = "busybox"
|
||||
command = "sh"
|
||||
volumes = ["../alloc/data:/mnt"]
|
||||
args = [
|
||||
"-xec",
|
||||
<<-EOF
|
||||
mkdir -p /mnt/plugins
|
||||
wget -P /mnt/plugins \
|
||||
https://git.lab0x13.site/api/packages/scrow/generic/core-bukkit/UNVERSIONED/CoreBukkit.jar
|
||||
EOF
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
task "run" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
image = "git.lab0x13.site/scrow/papermc:0.2"
|
||||
force_pull = false
|
||||
ports = ["minecraft"]
|
||||
volumes = ["../alloc/data:/mnt"]
|
||||
}
|
||||
|
||||
env {
|
||||
HOST_POSTGRES = "jdbc:postgresql://postgres.service.consul/scrow"
|
||||
HOST_NATS = "nats://nats.service.consul"
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 1000
|
||||
memory = 2048
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue