JMusicBot

Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2021-09-14 22:01:28 +02:00
parent b29d9d71b7
commit 0cb9550abe
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
2 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,3 @@
path "kv/data/jmusicbot" {
capabilities = ["read"]
}

View file

@ -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 = <<EOF
{{ with secret "kv/data/jmusicbot" }}
BOT_TOKEN={{ .Data.data.token }}
BOT_OWNER={{ .Data.data.owner }}
{{ end }}
EOF
destination = "secrets/env"
env = true
}
}
}
}