move nomad job to dedicated folder
This commit is contained in:
parent
8ed77306e8
commit
6e4bc8929d
69
nomad-job/decom/rsyncd.nomad
Normal file
69
nomad-job/decom/rsyncd.nomad
Normal 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
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user