chore: backup infrastructure configurations [skip ci]
This commit is contained in:
@@ -42,7 +42,7 @@ job "foodplanner" {
|
||||
}
|
||||
resources {
|
||||
cpu = 500
|
||||
memory = 500
|
||||
memory = 1024
|
||||
}
|
||||
|
||||
# Restart policy
|
||||
|
||||
53
nomad_backup/postgres-backup.hcl
Normal file
53
nomad_backup/postgres-backup.hcl
Normal file
@@ -0,0 +1,53 @@
|
||||
job "postgres-backup" {
|
||||
datacenters = ["dc1"]
|
||||
type = "service"
|
||||
|
||||
constraint {
|
||||
attribute = "${attr.kernel.name}"
|
||||
value = "linux"
|
||||
}
|
||||
|
||||
|
||||
update {
|
||||
stagger = "10s"
|
||||
max_parallel = 1
|
||||
healthy_deadline = "5m"
|
||||
}
|
||||
|
||||
group "postgres-backup" {
|
||||
count = 1
|
||||
|
||||
restart {
|
||||
attempts = 6
|
||||
interval = "1m"
|
||||
delay = "10s"
|
||||
mode = "delay"
|
||||
}
|
||||
|
||||
task "postgres-backup" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
image = "ghcr.io/sstent/docker-pg-backup:latest"
|
||||
dns_servers = ["${attr.unique.network.ip-address}","192.168.4.250","8.8.8.8"]
|
||||
memory_hard_limit = "2048"
|
||||
volumes = [
|
||||
"/mnt/Public/configs/postgres_backups:/backups",
|
||||
]
|
||||
}
|
||||
|
||||
env {
|
||||
POSTGRES_HOST= "replica.postgres.service.dc1.consul"
|
||||
POSTGRES_USER= "postgres"
|
||||
POSTGRES_PASS= "postgres"
|
||||
}
|
||||
|
||||
|
||||
resources {
|
||||
cpu = 256 # 500 MHz
|
||||
memory = 64 # 128MB
|
||||
|
||||
} #end resources
|
||||
} #end task
|
||||
} # end group
|
||||
} # end job
|
||||
@@ -29,7 +29,7 @@ job "sonarr" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
image = "lscr.io/linuxserver/sonarr:develop"
|
||||
image = "lscr.io/linuxserver/sonarr:latest"
|
||||
|
||||
ports = ["http"]
|
||||
dns_servers = ["${attr.unique.network.ip-address}","192.168.4.250","8.8.8.8"]
|
||||
|
||||
Reference in New Issue
Block a user