Add prom ports to nextcloud backup

This commit is contained in:
IamTheFij 2022-05-09 21:44:26 -07:00
parent fc583abace
commit 7d587d59a1
2 changed files with 16 additions and 4 deletions

View File

@ -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

View File

@ -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"