Last active
March 10, 2021 11:09
-
-
Save okkdev/241ec5776ec8aacb7c8136609af14638 to your computer and use it in GitHub Desktop.
Valheim Server Nomad Job
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
client { | |
host_volume "valheim" { | |
path = "/opt/gamedata/valheim" | |
read_only = false | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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