2022-05-23 17:48:57 +00:00
|
|
|
|
|
|
|
job "dashboard" {
|
2022-10-17 19:44:55 +00:00
|
|
|
datacenters = ["homelab"]
|
2022-12-10 16:10:32 +00:00
|
|
|
priority = 30
|
2022-10-29 08:40:01 +00:00
|
|
|
type = "service"
|
2022-05-23 17:48:57 +00:00
|
|
|
meta {
|
|
|
|
forcedeploy = "1"
|
|
|
|
}
|
|
|
|
|
2022-10-29 08:40:01 +00:00
|
|
|
group "dashboard" {
|
2022-05-23 17:48:57 +00:00
|
|
|
network {
|
|
|
|
mode = "host"
|
|
|
|
port "http" {
|
|
|
|
to = 8080
|
|
|
|
}
|
|
|
|
}
|
2022-09-09 15:19:07 +00:00
|
|
|
|
2022-05-23 17:48:57 +00:00
|
|
|
task "homer" {
|
|
|
|
driver = "docker"
|
|
|
|
service {
|
|
|
|
name = "homer"
|
|
|
|
port = "http"
|
|
|
|
tags = [
|
2022-10-29 08:40:01 +00:00
|
|
|
"traefik.enable=true",
|
|
|
|
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`${NOMAD_JOB_NAME}.ducamps.win`)",
|
|
|
|
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win",
|
|
|
|
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
|
2023-10-07 16:40:40 +00:00
|
|
|
"traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure",
|
2022-05-23 17:48:57 +00:00
|
|
|
]
|
|
|
|
}
|
|
|
|
config {
|
|
|
|
image = "b4bz/homer"
|
|
|
|
ports = ["http"]
|
|
|
|
volumes = [
|
|
|
|
"/mnt/diskstation/nomad/homer:/www/assets"
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
env {
|
2022-10-29 08:40:01 +00:00
|
|
|
INIT_ASSETS = 0
|
2022-05-23 17:48:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
2022-05-24 05:59:26 +00:00
|
|
|
memory = 20
|
2022-05-23 17:48:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
task "homer-service-discovery" {
|
|
|
|
driver = "docker"
|
|
|
|
config {
|
2022-10-29 08:40:01 +00:00
|
|
|
image = "ducampsv/homer-service-discovery"
|
2022-05-23 17:48:57 +00:00
|
|
|
volumes = [
|
|
|
|
"/mnt/diskstation/nomad/homer/config.yml:/config.yml",
|
|
|
|
"local/base.yml:/base.yml"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
env {
|
2022-10-29 08:40:01 +00:00
|
|
|
SERVICE_DISCOVERY = "Consul"
|
|
|
|
CONSUL_HOST = "consul.service.consul:8500"
|
2022-05-23 17:48:57 +00:00
|
|
|
}
|
|
|
|
|
2022-10-29 08:40:01 +00:00
|
|
|
template {
|
|
|
|
data = <<EOH
|
2022-05-23 17:48:57 +00:00
|
|
|
title: "HomeLab dashboard"
|
|
|
|
subtitle: "VincentDcmps"
|
|
|
|
logo: "assets/logo.png"
|
|
|
|
header: True
|
|
|
|
footer: "automatic updated by <a href='https://github.com/vincentDcmps/homer-service-discovery'>homer-service-discovery</a>"
|
|
|
|
columns: "3"
|
|
|
|
connectivityCheck: true
|
|
|
|
proxy:
|
|
|
|
useCredentials: false
|
|
|
|
defaults:
|
|
|
|
layout: columns
|
2022-09-09 15:19:07 +00:00
|
|
|
colorTheme: auto
|
2022-05-23 17:48:57 +00:00
|
|
|
theme: default
|
|
|
|
colors:
|
|
|
|
light:
|
|
|
|
highlight-primary: "#3367d6"
|
|
|
|
highlight-secondary: "#4285f4"
|
|
|
|
highlight-hover: "#5a95f5"
|
|
|
|
background: "#f5f5f5"
|
|
|
|
card-background: "#ffffff"
|
|
|
|
text: "#363636"
|
|
|
|
text-header: "#424242"
|
|
|
|
text-title: "#303030"
|
|
|
|
text-subtitle: "#424242"
|
|
|
|
card-shadow: rgba(0, 0, 0, 0.1)
|
|
|
|
link: "#3273dc"
|
|
|
|
link-hover: "#363636"
|
|
|
|
dark:
|
|
|
|
highlight-primary: "#3367d6"
|
|
|
|
highlight-secondary: "#4285f4"
|
|
|
|
highlight-hover: "#5a95f5"
|
|
|
|
background: "#131313"
|
|
|
|
card-background: "#2b2b2b"
|
|
|
|
text: "#eaeaea"
|
|
|
|
text-header: "#ffffff"
|
|
|
|
text-title: "#fafafa"
|
|
|
|
text-subtitle: "#f5f5f5"
|
|
|
|
card-shadow: rgba(0, 0, 0, 0.4)
|
|
|
|
link: "#3273dc"
|
|
|
|
link-hover: "#ffdd57"
|
|
|
|
|
|
|
|
links:
|
|
|
|
- name: "github"
|
|
|
|
icon: "fab fa-github"
|
|
|
|
url: "https://github.com/vincentDcmps/"
|
|
|
|
target: "_blank" # optional html tag target attribute
|
|
|
|
- name: "notebook"
|
|
|
|
icon: "fas fa-book"
|
|
|
|
target: "_blank" # optional html tag target attribute
|
|
|
|
url: "https://www.ducamps.win/notebook/"
|
|
|
|
services:
|
|
|
|
- name: Application
|
2022-05-23 19:44:34 +00:00
|
|
|
icon: "fas fa-heartbeet"
|
2022-05-23 17:48:57 +00:00
|
|
|
items: []
|
|
|
|
- name: Platform
|
|
|
|
icon: "fas fa-code-branch"
|
2022-05-24 07:43:37 +00:00
|
|
|
items:
|
|
|
|
- name: Nomad
|
|
|
|
logo: https://www.datocms-assets.com/2885/1620155100-brandhcnomadverticalcolor.svg
|
|
|
|
url: http://nomad.service.consul:4646
|
|
|
|
target: "_blank"
|
|
|
|
- name: Consul
|
|
|
|
logo: http://consul.service.consul:8500/ui/assets/apple-touch-icon-01cd4680782fbb5bc02301347df9903d.png
|
|
|
|
url: http://consul.service.consul:8500
|
|
|
|
target: "_blank"
|
|
|
|
- name: Vault
|
2022-09-09 15:19:07 +00:00
|
|
|
logo: http://active.vault.service.consul:8200/ui/favicon-c02e22ca67f83a0fb6f2fd265074910a.png
|
2022-05-24 07:43:37 +00:00
|
|
|
url: http://active.vault.service.consul:8200
|
|
|
|
target: "_blank"
|
|
|
|
|
|
|
|
|
2022-05-23 19:44:34 +00:00
|
|
|
- name: Monitoring
|
|
|
|
icon: "fab fa-watchman-monitoring"
|
|
|
|
items: []
|
|
|
|
|
2022-05-23 17:48:57 +00:00
|
|
|
EOH
|
|
|
|
destination = "local/base.yml"
|
|
|
|
|
|
|
|
}
|
|
|
|
resources {
|
2022-10-29 08:40:01 +00:00
|
|
|
memory = 30
|
2022-05-23 17:48:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|