formatting

This commit is contained in:
vincent 2022-10-29 10:40:01 +02:00
parent 732d4b458d
commit a3abcb41a3
29 changed files with 500 additions and 500 deletions

View File

@ -11,14 +11,14 @@ job "MQTT" {
value = "oscar"
}
group "MQTT"{
group "MQTT" {
network {
mode = "host"
port "zigbee2mqtt" {
to = 8090
}
port "mosquittoMQTT" {
static= 1883
static = 1883
to = 1883
}
port "mosquittoWS" {
@ -36,7 +36,7 @@ job "MQTT" {
}
config {
image = "eclipse-mosquitto"
ports = ["mosquittoWS","mosquittoMQTT"]
ports = ["mosquittoWS", "mosquittoMQTT"]
volumes = [
"/mnt/diskstation/nomad/mosquitto:/mosquitto/data",
"local/mosquitto.conf:/mosquitto/config/mosquitto.conf"
@ -47,7 +47,7 @@ job "MQTT" {
TZ = "Europe/Paris"
}
template {
data= <<EOH
data = <<EOH
persistence false
log_dest stdout
listener 1883
@ -77,7 +77,7 @@ connection_messages true
}
config {
image = "koenkk/zigbee2mqtt"
privileged= true
privileged = true
ports = ["zigbee2mqtt"]
volumes = [
"/mnt/diskstation/nomad/zigbee2mqtt:/app/data",
@ -92,7 +92,7 @@ connection_messages true
}
template {
data= <<EOH
data = <<EOH
# MQTT settings
mqtt:
# MQTT base topic for Zigbee2MQTT MQTT messages

View File

@ -6,7 +6,7 @@ job "alertmanager" {
forcedeploy = "0"
}
group "alertmanager"{
group "alertmanager" {
network {
mode = "host"
port "http" {

View File

@ -5,7 +5,7 @@ job "chainetv" {
meta {
forcedeploy = "2"
}
group "chainetv"{
group "chainetv" {
network {
mode = "host"
port "http" {

View File

@ -1,25 +1,25 @@
job "crowdsec-agent" {
datacenters = ["homelab","hetzner"]
datacenters = ["homelab", "hetzner"]
type = "system"
meta {
forcedeploy = "2"
}
vault{
policies= ["access-tables"]
vault {
policies = ["access-tables"]
}
group "crowdsec-agent"{
group "crowdsec-agent" {
network {
mode = "host"
port "metric"{
port "metric" {
to = 6060
}
}
task "crowdsec-agent" {
service {
name= "crowdsec-metrics"
name = "crowdsec-metrics"
port = "metric"
tags = [
]
@ -36,8 +36,8 @@ job "crowdsec-agent" {
}
env {
COLLECTIONS= "crowdsecurity/traefik crowdsecurity/home-assistant LePresidente/gitea"
DISABLE_LOCAL_API= "true"
COLLECTIONS = "crowdsecurity/traefik crowdsecurity/home-assistant LePresidente/gitea"
DISABLE_LOCAL_API = "true"
}
template {
data = <<EOH
@ -73,7 +73,7 @@ AGENT_USERNAME = "{{ env "node.unique.name" }}"
AGENT_PASSWORD = "{{.Data.data.AGENT_PASSWORD}}"
{{end}}
EOH
destination ="secret/agent.env"
destination = "secret/agent.env"
env = "true"
}
resources {

View File

@ -4,7 +4,7 @@ job "crowdsec-api" {
meta {
forcedeploy = "-1"
}
vault{
vault {
policies = ["access-tables"]
}
group "crowdsec-api" {
@ -14,28 +14,28 @@ job "crowdsec-api" {
static = 8898
to = 8080
}
port "metric"{
port "metric" {
to = 6060
}
}
task "crowdsec-api" {
service {
name= "crowdsec-metrics"
name = "crowdsec-metrics"
port = "metric"
tags = [
]
}
driver = "docker"
service {
name= "crowdsec-api"
name = "crowdsec-api"
port = "http"
tags = [
]
}
config {
image ="crowdsecurity/crowdsec"
ports = ["http","metric"]
image = "crowdsecurity/crowdsec"
ports = ["http", "metric"]
volumes = [
"/mnt/diskstation/nomad/crowdsec/db:/var/lib/crowdsec/data",
"/mnt/diskstation/nomad/crowdsec/data:/etc/crowdsec_data",
@ -50,7 +50,7 @@ DISABLE_AGENT = "true"
AGENT_PASSWORD = "{{.Data.data.AGENT_PASSWORD}}"
{{end}}
EOH
destination ="secret/api.env"
destination = "secret/api.env"
env = "true"
}
resources {

View File

@ -6,7 +6,7 @@ job "dashboard" {
forcedeploy = "1"
}
group "dashboard"{
group "dashboard" {
network {
mode = "host"
port "http" {
@ -35,7 +35,7 @@ job "dashboard" {
}
env {
INIT_ASSETS= 0
INIT_ASSETS = 0
}
resources {
@ -45,18 +45,18 @@ job "dashboard" {
task "homer-service-discovery" {
driver = "docker"
config {
image= "ducampsv/homer-service-discovery"
image = "ducampsv/homer-service-discovery"
volumes = [
"/mnt/diskstation/nomad/homer/config.yml:/config.yml",
"local/base.yml:/base.yml"
]
}
env {
SERVICE_DISCOVERY="Consul"
SERVICE_DISCOVERY = "Consul"
CONSUL_HOST = "consul.service.consul:8500"
}
template{
template {
data = <<EOH
title: "HomeLab dashboard"
subtitle: "VincentDcmps"
@ -138,7 +138,7 @@ services:
}
resources {
memory= 30
memory = 30
}
}

View File

@ -49,7 +49,7 @@ job "drone" {
}
template {
data= <<EOH
data = <<EOH
{{ with secret "secrets/data/droneCI"}}
DRONE_GITEA_SERVER="https://git.ducamps.win"
DRONE_GITEA_CLIENT_ID="{{ .Data.data.DRONE_GITEA_CLIENT_ID }}"
@ -71,11 +71,11 @@ job "drone" {
}
}
task "drone-runner"{
task "drone-runner" {
driver = "docker"
config {
image = "drone/drone-runner-docker:latest"
volumes =[
volumes = [
"/var/run/docker.sock:/var/run/docker.sock",
]
}
@ -83,7 +83,7 @@ job "drone" {
}
template {
data= <<EOH
data = <<EOH
{{ with secret "secrets/data/droneCI"}}
DRONE_RPC_HOST="drone.ducamps.win"
DRONE_RPC_PROTO="https"
@ -104,11 +104,11 @@ job "drone" {
attribute = "${attr.cpu.arch}"
value = "arm"
}
task "drone-ARM-runner"{
task "drone-ARM-runner" {
driver = "docker"
config {
image = "drone/drone-runner-docker:latest"
volumes =[
image = "drone/drone-runner-docker:1.8.2-linux-arm"
volumes = [
"/var/run/docker.sock:/var/run/docker.sock",
]
}
@ -116,7 +116,7 @@ job "drone" {
}
template {
data= <<EOH
data = <<EOH
{{ with secret "secrets/data/droneCI"}}
DRONE_RPC_HOST="drone.ducamps.win"
DRONE_RPC_PROTO="https"

View File

@ -11,13 +11,13 @@ job "filestash" {
}
group "filestash"{
group "filestash" {
network {
mode = "host"
port "http" {
to = 8334
}
port "onlyoffice"{
port "onlyoffice" {
to = 80
}
}
@ -50,7 +50,7 @@ job "filestash" {
}
env {
APPLICATION_URL= ""
APPLICATION_URL = ""
}
resources {

View File

@ -37,7 +37,7 @@ job "git" {
]
}
service {
name= "gitea-ssh"
name = "gitea-ssh"
port = "ssh"
tags = [
"traefik.enable=true",
@ -76,7 +76,7 @@ job "git" {
GITEA__webhook__ALLOWED_HOST_LIST = "drone.ducamps.win"
}
template {
data= <<EOH
data = <<EOH
{{ with secret "secrets/data/gitea"}}
GITEA__database__PASSWD = "{{.Data.data.PASSWD}}"
GITEA__security__SECRET_KEY = "{{.Data.data.secret_key}}"

View File

@ -14,7 +14,7 @@ job "grafana" {
service {
name = "grafana"
port = "http"
tags= [
tags = [
"homer.enable=true",
"homer.name=Grafana",
"homer.service=Monitoring",

View File

@ -10,20 +10,20 @@ job "homeassistant" {
value = "oscar"
}
group "homeassistant"{
group "homeassistant" {
network {
mode = "host"
port "http" {
to = 8123
static = 8123
}
port "coap"{
port "coap" {
to = 5683
static = 5683
}
}
vault{
policies= ["access-tables"]
vault {
policies = ["access-tables"]
}
@ -55,7 +55,7 @@ job "homeassistant" {
}
config {
image = "homeassistant/home-assistant:stable"
ports = ["http","coap"]
ports = ["http", "coap"]
privileged = "true"
network_mode = "host"
volumes = [
@ -72,4 +72,4 @@ job "homeassistant" {
}
}
}
}

View File

@ -10,7 +10,7 @@ job "jellyfin" {
value = "amd64"
}
group "jellyfin"{
group "jellyfin" {
network {
mode = "host"
port "http" {
@ -61,7 +61,7 @@ job "jellyfin" {
}
resources {
memory = 2000
cpu= 3000
cpu = 3000
}
}

View File

@ -6,7 +6,7 @@ job "loki" {
forcedeploy = "0"
}
group "loki"{
group "loki" {
network {
mode = "host"
port "http" {

View File

@ -1,11 +1,11 @@
job "node-exporter" {
datacenters = ["homelab","hetzner"]
datacenters = ["homelab", "hetzner"]
type = "system"
meta {
forcedeploy = "0"
}
group "node-exporter"{
group "node-exporter" {
network {
port "http" {
}

View File

@ -6,7 +6,7 @@ job "pacoloco" {
forcedeploy = "0"
}
group "pacoloco"{
group "pacoloco" {
network {
mode = "host"
port "http" {
@ -36,7 +36,7 @@ job "pacoloco" {
}
template {
data= <<EOH
data = <<EOH
port: 9129
cache_dir: /var/cache/pacoloco
purge_files_after: 360000

View File

@ -1,7 +1,7 @@
job "paperless-ng" {
datacenters = ["homelab"]
priority= 50
priority = 50
type = "service"
meta {
forcedeploy = "0"
@ -12,7 +12,7 @@ job "paperless-ng" {
value = "amd64"
}
group "paperless-ng"{
group "paperless-ng" {
network {
mode = "host"
port "http" {
@ -22,15 +22,15 @@ job "paperless-ng" {
to = 6379
}
}
vault{
policies= ["access-tables"]
vault {
policies = ["access-tables"]
}
task "redis" {
driver = "docker"
config {
image= "redis"
ports= ["redis"]
image = "redis"
ports = ["redis"]
}
resources {
memory = 100
@ -56,7 +56,7 @@ job "paperless-ng" {
check {
type = "http"
name = "paperless-ng_health"
path="/"
path = "/"
interval = "30s"
timeout = "5s"
}
@ -73,18 +73,18 @@ job "paperless-ng" {
}
env {
PAPERLESS_REDIS= "redis://${NOMAD_ADDR_redis}"
PAPERLESS_DBHOST= "db1.ducamps.win"
PAPERLESS_DBNAME= "paperless"
PAPERLESS_DBUSER= "paperless"
PAPERLESS_OCR_LANGUAGE="fra"
PAPERLESS_CONSUMER_POLLING="60"
PAPERLESS_URL="https://${NOMAD_JOB_NAME}.ducamps.win"
PAPERLESS_ALLOWED_HOSTS="*"
PAPERLESS_REDIS = "redis://${NOMAD_ADDR_redis}"
PAPERLESS_DBHOST = "db1.ducamps.win"
PAPERLESS_DBNAME = "paperless"
PAPERLESS_DBUSER = "paperless"
PAPERLESS_OCR_LANGUAGE = "fra"
PAPERLESS_CONSUMER_POLLING = "60"
PAPERLESS_URL = "https://${NOMAD_JOB_NAME}.ducamps.win"
PAPERLESS_ALLOWED_HOSTS = "*"
}
template {
data= <<EOH
data = <<EOH
PAPERLESS_DBPASS= {{ with secret "secrets/data/paperless"}}{{.Data.data.DB_PASSWORD }}{{end}}
EOH
destination = "secrets/paperless.env"

View File

@ -1,7 +1,7 @@
job "pihole" {
datacenters = ["homelab"]
priority= 100
priority = 100
meta {
force = 1
}
@ -43,20 +43,20 @@ job "pihole" {
"dns",
"http",
]
volumes =[
volumes = [
"local/dnsmasq.d/02-localresolver.conf:/etc/dnsmasq.d/02-localresolver.conf",
"/mnt/diskstation/nomad/pihole:/etc/pihole"
]
}
vault{
policies= ["access-tables"]
vault {
policies = ["access-tables"]
}
env {
TZ= "Europe/Paris"
DNS1= "1.1.1.1"
DNS2= "80.67.169.40"
TZ = "Europe/Paris"
DNS1 = "1.1.1.1"
DNS2 = "80.67.169.40"
}
template {
@ -67,8 +67,8 @@ job "pihole" {
change_mode = "noop"
env = true
}
template{
data= <<EOH
template {
data = <<EOH
server=/ducamps.win/192.168.1.10
{{range service "consul"}}server=/consul/{{.Address}}#8600
{{end}}
@ -76,7 +76,7 @@ domain=ducamps.win
no-negcache
local-ttl=2
EOH
destination="local/dnsmasq.d/02-localresolver.conf"
destination = "local/dnsmasq.d/02-localresolver.conf"
change_mode = "restart"
}

View File

@ -1,12 +1,12 @@
job "promtail" {
datacenters = ["homelab","hetzner"]
datacenters = ["homelab", "hetzner"]
type = "system"
meta {
forcedeploy = "0"
}
group "promtail"{
group "promtail" {
network {
mode = "host"
port "http" {

View File

@ -5,15 +5,15 @@ job "radicale" {
meta {
forcedeploy = "0"
}
group "radicale"{
group "radicale" {
network {
mode = "host"
port "http" {
to = 5232
}
}
vault{
policies= ["access-tables"]
vault {
policies = ["access-tables"]
}
task "radicale" {
@ -50,7 +50,7 @@ job "radicale" {
}
env {
TAKE_FILE_OWNERSHIP=false
TAKE_FILE_OWNERSHIP = false
}
template {
data = <<EOH

View File

@ -5,7 +5,7 @@ job "torrent" {
meta {
forcedeploy = "0"
}
group "bittorent"{
group "bittorent" {
network {
mode = "host"
port "http" {
@ -13,11 +13,11 @@ job "torrent" {
host_network = "private"
}
port "torrent" {
static=6881
static = 6881
host_network = "public"
}
port "ecoute" {
static= 50000
static = 50000
host_network = "public"
}
}
@ -55,10 +55,10 @@ job "torrent" {
}
env {
PUID=1024
PGID=984
UMASK=002
WEBUI_PORT="8070"
PUID = 1024
PGID = 984
UMASK = 002
WEBUI_PORT = "8070"
}
resources {

View File

@ -15,12 +15,12 @@ job "seedboxsync" {
cron = "0,30 * * * *"
prohibit_overlap = true
}
group "seedboxsync"{
group "seedboxsync" {
network {
mode = "host"
}
vault{
policies= ["access-tables"]
vault {
policies = ["access-tables"]
}
task "server" {
driver = "docker"
@ -32,19 +32,19 @@ job "seedboxsync" {
volumes = [
"/mnt/diskstation/media/download:/media"
]
args=[
"-u" ,"${USERNAME},${PASSWORD}",
"-e" ,"mirror -c -P 5 -x seed ${REMOTE_PATH} /media;quit",
args = [
"-u", "${USERNAME},${PASSWORD}",
"-e", "mirror -c -P 5 -x seed ${REMOTE_PATH} /media;quit",
"${REMOTE_SERVER}"
]
}
env {
USER_ID=1000001
GROUP_ID=1000007
USER_ID = 1000001
GROUP_ID = 1000007
}
template {
data= <<EOH
data = <<EOH
{{ with secret "secrets/data/seedbox"}}
USERNAME = "{{ .Data.data.username }}"
PASSWORD = "{{ .Data.data.password }}"

View File

@ -10,18 +10,18 @@ job "supysonic" {
value = "amd64"
}
group "supysonic"{
group "supysonic" {
network {
mode = "host"
port "fcgi" {
to = 5000
}
port "http" {
to=80
to = 80
}
}
vault{
policies= ["access-tables"]
vault {
policies = ["access-tables"]
}
service {
@ -47,8 +47,8 @@ job "supysonic" {
task "supysonic-frontend" {
driver = "docker"
config {
image= "nginx:alpine"
ports= [
image = "nginx:alpine"
ports = [
"http"
]
volumes = [
@ -92,21 +92,21 @@ http {
config {
image = "ogarcia/supysonic:full-sql"
ports = ["fcgi"]
force_pull= true
force_pull = true
volumes = [
"/mnt/diskstation/music:/mnt/diskstation/music"
]
}
env {
SUPYSONIC_RUN_MODE= "fcgi-port"
SUPYSONIC_RUN_MODE = "fcgi-port"
SUPYSONIC_DAEMON_ENABLED = "true"
SUPYSONIC_WEBAPP_LOG_LEVEL = "WARNING"
SUPYSONIC_DAEMON_LOG_LEVEL = "INFO"
}
template {
data= <<EOH
data = <<EOH
{{ with secret "secrets/data/supysonic"}}
SUPYSONIC_DB_URI = "postgres://supysonic:{{ .Data.data.db_password}}@db1.ducamps.win/supysonic"
{{end}}

View File

@ -6,21 +6,21 @@ job "syncthing" {
forcedeploy = "0"
}
group "syncthing"{
group "syncthing" {
network {
mode = "host"
port "http" {
to = 8384
}
port "listen"{
port "listen" {
static = 22000
}
port "discovery" {
static = 21027
}
}
vault{
policies= ["access-tables"]
vault {
policies = ["access-tables"]
}
task "syncthing" {

View File

@ -3,7 +3,7 @@ job "traefik-ingress" {
type = "service"
meta {
force_deploy= 1
force_deploy = 1
}
group "traefik-ingress" {
network {
@ -25,8 +25,8 @@ job "traefik-ingress" {
host_network = "public"
}
}
vault{
policies=["access-tables"]
vault {
policies = ["access-tables"]
}
task "traefik" {
driver = "docker"
@ -61,7 +61,7 @@ job "traefik-ingress" {
"admin",
"ssh"
]
volumes =[
volumes = [
"local/traefik.toml:/etc/traefik/traefik.toml",
"/mnt/diskstation/nomad/traefik/acme.json:/acme.json"
]
@ -71,15 +71,15 @@ job "traefik-ingress" {
#}
env {
}
template{
data=<<EOH
template {
data = <<EOH
GANDIV5_API_KEY = "{{with secret "secrets/data/gandi"}}{{.Data.data.API_KEY}}{{end}}"
EOH
destination= "secrets/gandi.env"
destination = "secrets/gandi.env"
env = true
}
template{
data= <<EOH
template {
data = <<EOH
[entryPoints]
[entrypoints.ssh]

View File

@ -18,8 +18,8 @@ job "traefik-local" {
static = 9080
}
}
vault{
policies=["access-tables"]
vault {
policies = ["access-tables"]
}
task "traefik" {
@ -55,7 +55,7 @@ job "traefik-local" {
"admin",
"ssh"
]
volumes =[
volumes = [
"local/traefik.toml:/etc/traefik/traefik.toml",
"/mnt/diskstation/nomad/traefik/acme-local.json:/acme.json"
]
@ -65,16 +65,16 @@ job "traefik-local" {
#}
env {
}
template{
data=<<EOH
template {
data = <<EOH
GANDIV5_API_KEY = "{{with secret "secrets/data/gandi"}}{{.Data.data.API_KEY}}{{end}}"
EOH
destination= "secrets/gandi.env"
destination = "secrets/gandi.env"
env = true
}
template{
data= <<EOH
template {
data = <<EOH
[entryPoints]
[entryPoints.web]
address = ":80"

View File

@ -16,7 +16,7 @@ job "tt-rss" {
}
network {
mode = "host"
port "http"{
port "http" {
to = 80
}
port "appPort" {
@ -64,7 +64,7 @@ job "tt-rss" {
TTRSS_SELF_URL_PATH = "https://www.ducamps.win/tt-rss"
}
template {
data= <<EOH
data = <<EOH
{{ with secret "secrets/data/ttrss"}}
TTRSS_DB_PASS = "{{ .Data.data.DB_PASS }}"
{{end}}
@ -96,7 +96,7 @@ job "tt-rss" {
TTRSS_SELF_URL_PATH = "https://rss.ducamps.win/tt-rss"
}
template {
data= <<EOH
data = <<EOH
{{ with secret "secrets/data/ttrss"}}
TTRSS_DB_PASS = "{{ .Data.data.DB_PASS }}"
{{end}}
@ -113,8 +113,8 @@ job "tt-rss" {
task "ttrss-frontend" {
driver = "docker"
config {
image= "nginx:alpine"
ports= [
image = "nginx:alpine"
ports = [
"http"
]
volumes = [

View File

@ -6,15 +6,15 @@ job "vaultwarden" {
forcedeploy = "0"
}
group "vaultwarden"{
group "vaultwarden" {
network {
mode = "host"
port "http" {
to = 80
}
}
vault{
policies= ["access-tables"]
vault {
policies = ["access-tables"]
}
task "vaultwarden" {
@ -63,7 +63,7 @@ job "vaultwarden" {
}
template {
data= <<EOH
data = <<EOH
{{ with secret "secrets/data/vaultwarden"}}
DATABASE_URL=postgresql://vaultwarden:{{ .Data.data.DB_PASSWORD }}@db1.ducamps.win/vaultwarden
{{end}}

View File

@ -37,14 +37,14 @@ job "www" {
ports = [
"http"
]
volumes =[
volumes = [
"local/nginx.conf:/etc/nginx/nginx.conf",
"/srv/http:/usr/share/nginx/html"
]
}
template{
data= <<EOH
template {
data = <<EOH
worker_processes auto;
pid /var/run/nginx.pid;
events {
@ -73,7 +73,7 @@ http {
}
EOH
destination="local/nginx.conf"
destination = "local/nginx.conf"
}
resources {
memory = 50