Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions jobs/games/minecraft/template.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
job "minecraft-SERVICENAME" {
datacenters = ["aperture"]
type = "service"

group "SERVICENAME-mc" {
count = 1

network {
port "mc" {
to = 25565
}
port "rcon" {
to = 25575
}
}

service {
name = "SERVICENAME-mc"
port = "mc"
}

service {
name = "SERVICENAME-mc-rcon"
port = "rcon"
}

task "minecraft" {
driver = "docker"
config {
image = "itzg/minecraft-server:latest"
ports = ["mc", "rcon"]
volumes = [
"/storage/nomad/${NOMAD_JOB_NAME}/data:/data",
"local/plugins:/plugins",
"local/mods:/mods",
]
}

resources {
cpu = 5000 # 5000 MHz
memory = 8192 # 8 GB
}

# Server Settings/Enviorments block
template {
destination = "local/.env"
env = true
data = <<EOF
EULA = "TRUE"
TYPE = "PAPER"
VERSION = "CHANGEME"
ICON = "https://docs.redbrick.dcu.ie/res/logo.png"
MAX_MEMORY = "8G"
MOTD = "A Redbrick Server"
MAX_PLAYERS = "20"
ENABLE_RCON = "true"
RCON_PASSWORD = "{{ key "games/mc/SERVICENAME-mc/rcon/password" }}"
SPAWN_PROTECTION = "0"
OPS = "CHANGEME"
EOF
}
}
}
}
1 change: 0 additions & 1 deletion jobs/games/minecraft/vanilla.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ job "minecraft-vanilla" {
"traefik.enable=true",
"traefik.http.routers.vanilla-mc-bluemap.rule=Host(`vanilla-mc.rb.dcu.ie`)",
"traefik.http.routers.vanilla-mc-bluemap.entrypoints=web,websecure",
"traefik.http.routers.vanilla-mc-bluemap.tls.certresolver=rb",
]
}

Expand Down
1 change: 0 additions & 1 deletion jobs/games/minecraft/wilko.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ job "minecraft-wilko" {
"traefik.enable=true",
"traefik.http.routers.wilko-mc-dynmap.rule=Host(`wilko-mc.rb.dcu.ie`)",
"traefik.http.routers.wilko-mc-dynmap.entrypoints=web,websecure",
"traefik.http.routers.wilko-mc-dynmap.tls.certresolver=rb",
]
}

Expand Down
97 changes: 97 additions & 0 deletions jobs/games/palworld/palworld.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
job "palworld-server" {
datacenters = ["aperture"]
type = "service"

constraint {
attribute = "${meta.ingress_vip_node}"
value = "1"
}

group "palworld" {
count = 1

network {
mode = "bridge"

port "game" {
to = 8211
}
port "query" {
to = 27015
}
}

service {
name = "palworld-game"
port = "game"
task = "server"

tags = [
"traefik.enable=true",
"traefik.udp.routers.palworld-game.entrypoints=palworld-game",
]
}

service {
name = "palworld-query"
port = "query"
task = "server"

tags = [
"traefik.enable=true",
"traefik.udp.routers.palworld-query.entrypoints=palworld-query",
]
}

task "server" {
driver = "docker"

config {
image = "thijsvanloef/palworld-server-docker:latest"

volumes = [
"/storage/nomad/${NOMAD_JOB_NAME}/${NOMAD_TASK_NAME}:/palworld"
]
}

env {
PORT = "8211"
QUERY_PORT = "27015"
PLAYERS = "32"
ENABLE_PERF_THREADING_ARGS = "true"
RCON_ENABLED = "true"
RCON_PORT = "25575"
IS_MULTIPLAY = "true"
PUID = "1000"
PGID = "1000"
UPDATE_ON_BOOT = "true"
BACKUP_ENABLED = "true"
BACKUP_CRON_EXPRESSION = "0 */1 * * *"

# Note: Fixed variable typo below (changed AUTO_UPDATES_ENABLED to AUTO_UPDATE_ENABLED to match image standard)
AUTO_UPDATE_ENABLED = "true"
AUTO_UPDATE_CRON_EXPRESSION = "0 * * * *"
AUTO_UPDATE_WARN_MINUTES = "30"

SERVER_IP = "0.0.0.0"
PUBLIC_IP = "136.206.16.50"
SERVER_NAME = "Redbrick Palworld Server"
SERVER_DESCRIPTION = "..."
LOG_LEVEL = "INFO"
}

template {
data = <<EOH
ADMIN_PASSWORD={{ key "games/palworld/admin_password" }}
EOH
destination = "local/.env"
env = true
}

resources {
cpu = 4000
memory = 32768
}
}
}
}
7 changes: 2 additions & 5 deletions jobs/ingress/gate-proxy.hcl
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
job "gate-proxy" {
datacenters = ["aperture"]
node_pool = "ingress"
type = "service"
type = "system"

group "gate-proxy" {
count = 1

network {
port "mc" {
static = 25565
Expand All @@ -28,7 +25,7 @@ job "gate-proxy" {
config {
image = "ghcr.io/minekube/gate"
ports = ["mc"]

network_mode = "host"
volumes = [
"local/config.yaml:/config.yaml"
]
Expand Down
Loading