Add prom ports to nextcloud backup
This commit is contained in:
parent
2ed2079b45
commit
3b8f9734ac
@ -132,10 +132,6 @@ scrape_configs:
|
||||
metrics_path: "/metrics"
|
||||
consul_sd_configs:
|
||||
- server: "${var.consul_address}"
|
||||
services:
|
||||
- "cadvisor"
|
||||
- "nodeexporter"
|
||||
- "blocky-api"
|
||||
relabel_configs:
|
||||
- source_labels: [__meta_consul_service_metadata_metrics_addr]
|
||||
action: keep
|
||||
|
@ -27,10 +27,15 @@ job "nextcloud" {
|
||||
|
||||
network {
|
||||
mode = "bridge"
|
||||
|
||||
port "web" {
|
||||
host_network = "loopback"
|
||||
to = 80
|
||||
}
|
||||
|
||||
port "backup" {
|
||||
to = 8080
|
||||
}
|
||||
}
|
||||
|
||||
volume "nextcloud-data" {
|
||||
@ -138,6 +143,16 @@ job "nextcloud" {
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
name = "nextcloud-backups"
|
||||
port = "backup"
|
||||
|
||||
meta {
|
||||
metrics_addr = "${NOMAD_ADDR_backup}"
|
||||
}
|
||||
}
|
||||
|
||||
# TODO: Add service and expose /metrics for prometheus to grab
|
||||
task "backup" {
|
||||
driver = "docker"
|
||||
|
||||
@ -150,6 +165,7 @@ job "nextcloud" {
|
||||
config {
|
||||
image = "iamthefij/resticscheduler"
|
||||
args = ["/jobs/nextcloud.hcl"]
|
||||
ports = ["backup"]
|
||||
|
||||
mount {
|
||||
type = "bind"
|
||||
|
Loading…
Reference in New Issue
Block a user