From 0cb9550abe39dc8a86c9d7d10d87ffa8783954aa Mon Sep 17 00:00:00 2001 From: Magic_RB Date: Tue, 14 Sep 2021 22:01:28 +0200 Subject: [PATCH] JMusicBot Signed-off-by: Magic_RB --- infrastructure/jmusicbot/jmusicbot-policy.hcl | 3 ++ infrastructure/jmusicbot/nomad.hcl | 37 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 infrastructure/jmusicbot/jmusicbot-policy.hcl create mode 100644 infrastructure/jmusicbot/nomad.hcl diff --git a/infrastructure/jmusicbot/jmusicbot-policy.hcl b/infrastructure/jmusicbot/jmusicbot-policy.hcl new file mode 100644 index 0000000..e0a3261 --- /dev/null +++ b/infrastructure/jmusicbot/jmusicbot-policy.hcl @@ -0,0 +1,3 @@ +path "kv/data/jmusicbot" { + capabilities = ["read"] +} diff --git a/infrastructure/jmusicbot/nomad.hcl b/infrastructure/jmusicbot/nomad.hcl new file mode 100644 index 0000000..dd6fa9b --- /dev/null +++ b/infrastructure/jmusicbot/nomad.hcl @@ -0,0 +1,37 @@ +job "jmusicbot" { + datacenters = [ "homelab-1" ] + type = "service" + + group "jmusicbot" { + count = 1 + + task "jmusicbot" { + driver = "docker" + + config { + image = "nixng-jmusicbot:local" + memory_hard_limit = 192 + } + + resources { + cpu = 512 + memory = 128 + } + + vault { + policies = ["jmusicbot-policy"] + } + + template { + data = <