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

112
data/nomad/dns.nomad Normal file
View File

@@ -0,0 +1,112 @@
job "dns" {
region = "global"
datacenters = ["samfelag"]
type = "service"
group "dns" {
count = 1
restart {
attempts = 10
delay = "15s"
}
# VOLUMES
## pihole
volume "pihole" {
type = "host"
read_only = false
source = "dns-pihole"
}
volume "dnsmasq" {
type = "host"
read_only = false
source = "dns-dnsmasq"
}
## unbound
volume "unbound" {
type = "host"
read_only = false
source = "dns-unbound"
}
# NETWORK
network {
port "dns" {
static = 53
}
port "http" {
to = 80
}
port "unbound" {
static = 5533
}
}
# TASKS
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.80.195.56"
}
config {
image = "pihole/pihole:v5.7"
ports = ["dns", "http"]
}
resources {
cpu = 100
memory = 32
}
service {
name = "pihole-gui"
port = "http"
}
}
task "unbound" {
driver = "docker"
volume_mount {
volume = "unbound"
destination = "/opt/unbound/etc/unbound/"
read_only = false
}
config {
image = "mvance/unbound:latest"
ports = ["unbound"]
}
resources {
cpu = 50
memory = 32
}
}
}
}