Move wordpress to NFS.
This removes the need for the syncthing and rysnc plumbing.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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",
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user