Thingvellir as nomad server

This commit is contained in:
marc
2024-02-16 18:21:24 +01:00
parent 3c23709394
commit 87a4d79c71
27 changed files with 1253 additions and 18 deletions

View File

@@ -0,0 +1,73 @@
job "pihole" {
region = "global"
datacenters = ["samfelag"]
type = "service"
group "pihole" {
count = 1
volume "pihole" {
type = "host"
read_only = false
source = "dns-pihole"
}
volume "dnsmasq" {
type = "host"
read_only = false
source = "dns-dnsmasq"
}
restart {
attempts = 5
delay = "15s"
}
network {
port "dns" {
static = 53
}
port "http" {
to = 80
}
}
task "pihole" {
driver = "docker"
volume_mount {
volume = "pihole"
destination = "/etc/pihole"
read_only = false
}
volume_mount {
volume = "dnsmasq"
destination = "/etc/dnsmasq.d"
read_only = false
}
env {
TZ = "Europe/Amsterdam"
WEBPASSWORD = "elbonfeix"
ServerIP = "100.107.148.47"
}
config {
image = "pihole/pihole:v5.7"
ports = ["dns", "http"]
}
resources {
cpu = 100
memory = 64
}
service {
name = "pihole-gui"
port = "http"
}
}
}
}