diff --git a/nomad/metrics/prometheus.nomad b/nomad/metrics/prometheus.nomad index 1bd2dde..26b76d9 100644 --- a/nomad/metrics/prometheus.nomad +++ b/nomad/metrics/prometheus.nomad @@ -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 diff --git a/nomad/nextcloud/nextcloud.nomad b/nomad/nextcloud/nextcloud.nomad index 06eda32..5e3c7df 100644 --- a/nomad/nextcloud/nextcloud.nomad +++ b/nomad/nextcloud/nextcloud.nomad @@ -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"