mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-12-12 18:01:59 +01:00
5d516e080b
Signed-off-by: Magic_RB <magic_rb@redalder.org>
62 lines
1.1 KiB
HCL
62 lines
1.1 KiB
HCL
variable "flake_ref" {
|
|
type = string
|
|
}
|
|
|
|
variable "flake_sha" {
|
|
type = string
|
|
}
|
|
|
|
variable "store_path" {
|
|
type = string
|
|
}
|
|
|
|
job "minecraft-vanilla" {
|
|
datacenters = [ "homelab-1" ]
|
|
type = "service"
|
|
|
|
group "minecraft-vanilla" {
|
|
count = 1
|
|
|
|
volume "minecraft-vanilla" {
|
|
type = "csi"
|
|
source = "minecraft-vanilla"
|
|
read_only = false
|
|
|
|
attachment_mode = "file-system"
|
|
access_mode = "single-node-writer"
|
|
}
|
|
|
|
network {
|
|
mode = "bridge"
|
|
port "minecraft" {
|
|
static = 25560
|
|
to = 25565
|
|
}
|
|
}
|
|
|
|
|
|
task "minecraft-vanilla" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
nix_flake_ref = "${var.flake_ref}#nixngConfigurations.minecraft-vanilla.config.system.build.toplevel"
|
|
nix_flake_sha = var.flake_sha
|
|
nix_flake_store_path = var.store_path
|
|
entrypoint = [ "init" ]
|
|
|
|
ports = ["minecraft"]
|
|
}
|
|
|
|
resources {
|
|
cpu = 512
|
|
memory = 1280
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "minecraft-vanilla"
|
|
destination = "/var/lib/minecraft/vanilla"
|
|
read_only = false
|
|
}
|
|
}
|
|
}
|
|
}
|