move nomad job to dedicated folder

This commit is contained in:
vincent 2022-06-06 09:18:38 +02:00
parent 8ed77306e8
commit 6e4bc8929d
29 changed files with 69 additions and 0 deletions

View File

@ -0,0 +1,69 @@
job "rsyncd" {
datacenters = ["hetzner"]
type = "service"
meta {
forcedeploy = "1"
}
vault {
policies = ["access-tables"]
}
group "rsyncd"{
network {
mode = "host"
port "rsync" {
static = 873
}
}
task "server" {
driver = "docker"
config {
image = "vimagick/rsyncd"
ports = ["rsync"]
volumes = [
"/mnt/hetzner/storagebox/:/share",
"local/rsyncd.conf:/etc/rsyncd.conf",
"secrets/rsyncd.secrets:/etc/rsyncd.secrets"
]
}
template {
data= <<EOH
[global]
uid = root
guid = root
charset = utf-8
max connections = 8
reverse lookup = no
[storagebox]
path = /share
read only = no
#hosts allow = 192.168.1.0/24
auth users = *
secrets file = /etc/rsyncd.secrets
open noatim
#strict modes = false
EOH
destination = "local/rsyncd.conf"
}
template {
data= <<EOH
{{ with secret "secrets/data/rsyncd"}}
{{.Data.data.user}}:{{.Data.data.pass}}
{{end}}
EOH
destination = "secrets/rsyncd.secrets"
perms = 400
}
resources {
memory = 300
}
}
}
}