chore: backup infrastructure configurations [skip ci]

This commit is contained in:
github-actions[bot]
2025-11-24 15:25:01 +00:00
parent a5e11de6ed
commit 26a7d1eee1
31 changed files with 1016 additions and 306 deletions

View File

@@ -28,6 +28,8 @@ job "hass" {
# Stagger updates every 60 seconds
stagger = "10s"
max_parallel = 1
healthy_deadline = "15m"
progress_deadline = "20m"
}
group "hass" {
count = 1
@@ -39,92 +41,92 @@ job "hass" {
mode = "delay"
}
task "init" {
driver = "docker"
lifecycle {
hook = "prestart"
sidecar = false
}
config {
memory_hard_limit = "2048"
image_pull_timeout = "10m"
force_pull = false
image = "ghcr.io/sstent/rsync"
volumes = [
"/mnt/configs/${NOMAD_GROUP_NAME}:/config",
"/mnt/Public/config/${NOMAD_GROUP_NAME}:/configbackup",
"/mnt/Public/config/locks:/locks"
]
}
env {
DB_NAME = "home-assistant_v2.db"
}
resources {
cpu = 20 # 500 MHz
memory = 20 # 128MB
}
// template {
// data = <<EOH
// dbs:
// - path: /config/radarr.db
// replicas:
// - path: /configbackup
// EOH
// destination = "local/litestream.yml"
// task "init" {
// driver = "docker"
// lifecycle {
// hook = "prestart"
// sidecar = false
// }
}
// config {
// memory_hard_limit = "2048"
// image_pull_timeout = "10m"
// force_pull = false
// image = "ghcr.io/sstent/rsync"
// volumes = [
// "/mnt/configs/${NOMAD_GROUP_NAME}:/config",
// "/mnt/Public/config/${NOMAD_GROUP_NAME}:/configbackup",
// "/mnt/Public/config/locks:/locks"
// ]
// }
// env {
// DB_NAME = "home-assistant_v2.db"
// }
// resources {
// cpu = 20 # 500 MHz
// memory = 20 # 128MB
// }
// // template {
// // data = <<EOH
// // dbs:
// // - path: /config/radarr.db
// // replicas:
// // - path: /configbackup
// // EOH
// // destination = "local/litestream.yml"
// // }
// }
task "finalsync" {
driver = "docker"
lifecycle {
hook = "poststop"
}
config {
memory_hard_limit = "2048"
// task "finalsync" {
// driver = "docker"
// lifecycle {
// hook = "poststop"
// }
// config {
// memory_hard_limit = "2048"
image = "ghcr.io/sstent/rsync"
volumes = [
"/mnt/configs/${NOMAD_GROUP_NAME}:/config",
"/mnt/Public/config/${NOMAD_GROUP_NAME}:/configbackup",
"/mnt/Public/config/locks:/locks"
]
// image = "ghcr.io/sstent/rsync"
// volumes = [
// "/mnt/configs/${NOMAD_GROUP_NAME}:/config",
// "/mnt/Public/config/${NOMAD_GROUP_NAME}:/configbackup",
// "/mnt/Public/config/locks:/locks"
// ]
// args = ["flock", "-x", "/locks/${NOMAD_GROUP_NAME}_rsync.lock", "rsync", "-av","--exclude='8-20 * * *.db8-20 * * *'","--exclude='8-20 * * *.db'","--exclude='8-20 * * *.db-litestream'","--exclude='generations'","/config/","/configbackup/"]
}
resources {
cpu = 20 # 500 MHz
memory = 128 # 128MB
}
}
// // args = ["flock", "-x", "/locks/${NOMAD_GROUP_NAME}_rsync.lock", "rsync", "-av","--exclude='8-20 * * *.db8-20 * * *'","--exclude='8-20 * * *.db'","--exclude='8-20 * * *.db-litestream'","--exclude='generations'","/config/","/configbackup/"]
// }
// resources {
// cpu = 20 # 500 MHz
// memory = 128 # 128MB
// }
// }
task "sync" {
driver = "docker"
lifecycle {
hook = "poststart"
sidecar = true
}
config {
memory_hard_limit = "2048"
// task "sync" {
// driver = "docker"
// lifecycle {
// hook = "poststart"
// sidecar = true
// }
// config {
// memory_hard_limit = "2048"
image = "ghcr.io/sstent/rsync"
volumes = [
"/mnt/configs/:/configs",
"/mnt/Public/config/${NOMAD_GROUP_NAME}:/configbackup",
]
args = ["client"]
}
env {
CRON_TASK_1 = "50 8-20 * * *rsync -av --exclude='*.db*' --exclude='*.db' --exclude='.db-litestream' --exclude='generations' /configs/${NOMAD_GROUP_NAME}/ /configbackup/;"
}
resources {
cpu = 20 # 500 MHz
memory = 20 # 128MB
}
}
// image = "ghcr.io/sstent/rsync"
// volumes = [
// "/mnt/configs/:/configs",
// "/mnt/Public/config/${NOMAD_GROUP_NAME}:/configbackup",
// ]
// args = ["client"]
// }
// env {
// CRON_TASK_1 = "50 8-20 * * *rsync -av --exclude='*.db*' --exclude='*.db' --exclude='.db-litestream' --exclude='generations' /configs/${NOMAD_GROUP_NAME}/ /configbackup/;"
// }
// resources {
// cpu = 20 # 500 MHz
// memory = 20 # 128MB
// }
// }
@@ -146,6 +148,7 @@ job "hass" {
"local/configuration.yaml:/config/configuration.yaml",
"local/ui-lovelace.yaml:/config/ui-lovelace.yaml",
"/mnt/configs/hass:/config",
// "/mnt/Public/config/hass:/config",
]
// "local/auth_provider.homeassistant:/config/.storage/auth_provider.homeassistant"