Move wordpress to NFS.

This removes the need for the syncthing and rysnc plumbing.
This commit is contained in:
2025-10-22 15:01:01 +01:00
parent 2437d46aa9
commit f8aee0d438
4 changed files with 2 additions and 86 deletions

View File

@@ -1,30 +0,0 @@
job "wordpress-backup" {
datacenters = ["alo"]
type = "batch"
periodic {
crons = ["*/5 * * * * *"]
prohibit_overlap = true
}
group "cron" {
task "rsync" {
driver = "raw_exec"
config {
command = "/bin/sh"
args = [ "local/script.sh" ]
}
template {
destination = "local/script.sh"
data = <<EOH
set -e
/run/current-system/sw/bin/rsync -a /data/sync/wordpress/ /data/compute/appdata/wordpress/ && \
echo "last_success $(date +%s)" | \
/run/current-system/sw/bin/curl --data-binary @- http://pushgateway.service.consul:9091/metrics/job/wordpress_backup
EOH
}
}
}
}

View File

@@ -20,7 +20,7 @@ job "wordpress" {
image = "gitea.v.paler.net/ppetru/wordpress"
ports = ["http"]
volumes = [
"/data/sync/wordpress:/var/www/html",
"/data/services/wordpress:/var/www/html",
"local/php-custom.ini:/usr/local/etc/php/conf.d/php-custom.ini",
]
}