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