From 07f1f032b7f86d7671654235f5fc121f81e96859 Mon Sep 17 00:00:00 2001 From: Ayden Date: Fri, 28 Feb 2025 19:58:56 +0000 Subject: [PATCH] Esports: update discord bot job and add minecraft server (#101) * socs: update esports discord bot * esports: add minecraft server job --- jobs/games/minecraft/esports.hcl | 64 +++++++++++++++++++++++++++++++ jobs/socs/esports-discord-bot.hcl | 10 +++++ 2 files changed, 74 insertions(+) create mode 100644 jobs/games/minecraft/esports.hcl diff --git a/jobs/games/minecraft/esports.hcl b/jobs/games/minecraft/esports.hcl new file mode 100644 index 0000000..02f19d8 --- /dev/null +++ b/jobs/games/minecraft/esports.hcl @@ -0,0 +1,64 @@ +job "esports-minecraft" { + datacenters = ["aperture"] + type = "service" + + group "esports-mc" { + count = 1 + + network { + port "mc" { + to = 25565 + } + port "rcon" { + to = 25575 + } + } + + service { + name = "esports-mc" + port = "mc" + } + + service { + name = "esports-mc-rcon" + port = "rcon" + } + + task "esports-minecraft" { + driver = "docker" + config { + image = "itzg/minecraft-server" + ports = ["mc", "rcon"] + volumes = [ + "/storage/nomad/${NOMAD_TASK_NAME}:/data" + ] + } + + resources { + cpu = 5000 # 5000 MHz + memory = 20480 # 20 GB + } + + template { + data = <