mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-25 09:36:14 +01:00
JMusicBot
Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
parent
b29d9d71b7
commit
0cb9550abe
3
infrastructure/jmusicbot/jmusicbot-policy.hcl
Normal file
3
infrastructure/jmusicbot/jmusicbot-policy.hcl
Normal file
|
@ -0,0 +1,3 @@
|
|||
path "kv/data/jmusicbot" {
|
||||
capabilities = ["read"]
|
||||
}
|
37
infrastructure/jmusicbot/nomad.hcl
Normal file
37
infrastructure/jmusicbot/nomad.hcl
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue