Skip to content

Instantly share code, notes, and snippets.

@okkdev
Last active March 10, 2021 11:09
Show Gist options
  • Save okkdev/241ec5776ec8aacb7c8136609af14638 to your computer and use it in GitHub Desktop.
Save okkdev/241ec5776ec8aacb7c8136609af14638 to your computer and use it in GitHub Desktop.
Valheim Server Nomad Job
client {
host_volume "valheim" {
path = "/opt/gamedata/valheim"
read_only = false
}
}
job "valheim-server" {
datacenters = ["dc1"]
type = "service"
group "valheim-server" {
count = 1
volume "valheim" {
type = "host"
read_only = false
source = "valheim"
}
network {
port "p1" {
static = 2456
to = 2456
}
port "p2" {
static = 2457
to = 2457
}
}
task "valheim-server" {
driver = "docker"
volume_mount {
volume = "valheim"
destination = "/config"
read_only = false
}
env {
SERVER_NAME = "nomad valheim server"
SERVER_PASS = "secret"
WORLD_NAME = "world"
VPCFG_Server_enabled = true
VPCFG_Server_enforceMod = false
VPCFG_Server_dataRate = 600
}
config {
image = "lloesche/valheim-server"
ports = ["p1", "p2"]
}
resources {
cpu = 2500
memory = 3200
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment