This commit is contained in:
kento2 2026-08-19 02:15:39 +02:00
parent c4bf3b8bee
commit 8f29a4f56d
10 changed files with 819 additions and 15 deletions

View file

@ -18,6 +18,7 @@ job "lobby" {
name = "lobby"
port = "minecraft"
address_mode = "alloc"
tags = ["minecraft"]
check {
type = "tcp"
interval = "5s"
@ -45,13 +46,8 @@ job "lobby" {
"-xec",
<<-EOF
mkdir -p /mnt/plugins
cd /mnt/plugins
wget \
https://git.lab0x13.site/api/packages/scrow/generic/core-bukkit/UNVERSIONED/CoreBukkit.jar \
https://download.luckperms.net/1652/bukkit/loader/LuckPerms-Bukkit-5.5.65.jar \
https://hangarcdn.papermc.io/plugins/ViaVersion/ViaVersion/versions/5.11.0/PAPER/ViaVersion-5.11.0.jar \
https://hangarcdn.papermc.io/plugins/ViaVersion/ViaBackwards/versions/5.11.0/PAPER/ViaBackwards-5.11.0.jar
ls -l
wget -P /mnt/plugins \
https://git.lab0x13.site/api/packages/scrow/generic/core-bukkit/UNVERSIONED/CoreBukkit.jar
EOF
]
}
@ -61,7 +57,7 @@ job "lobby" {
driver = "docker"
config {
image = "git.lab0x13.site/scrow/papermc:0.1"
image = "git.lab0x13.site/scrow/papermc:0.2"
force_pull = false
ports = ["minecraft"]
volumes = ["../alloc/data:/mnt"]

View file

@ -2,13 +2,14 @@ job "velocity" {
type = "service"
group "velocity" {
network {
mode = "bridge"
port "ingress" {
static = 25565
}
dns {
servers = ["127.0.0.1"]
servers = ["172.17.0.1"]
}
}
@ -24,12 +25,48 @@ job "velocity" {
}
}
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-velocity/UNVERSIONED/CoreVelocity.jar
EOF
]
}
}
task "velocity" {
driver = "docker"
config {
image = "scrow/velocity:local"
image = "git.lab0x13.site/scrow/velocity:0.1"
ports = ["ingress"]
volumes = ["../alloc/data:/mnt"]
}
env {
HOST_POSTGRES = "jdbc:postgresql://postgres.service.consul/scrow"
HOST_NATS = "nats://nats.service.consul"
HOST_CONSUL = "http://172.17.0.1:8500"
}
resources {
cpu = 1000
memory = 500