Created
March 28, 2021 01:06
-
-
Save nateberkopec/760369fc3ee5d777ae0da247355aded6 to your computer and use it in GitHub Desktop.
Pihole and homekit HCLs for Nomad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "homebridge" { | |
datacenters = ["dc1"] | |
group "server" { | |
network { | |
port "http" { | |
to = 8581 | |
} | |
} | |
task "container" { | |
# The "driver" parameter specifies the task driver that should be used to | |
# run the task. | |
driver = "docker" | |
env { | |
TZ = "America/Denver" | |
} | |
config { | |
image = "oznu/homebridge:latest" | |
ports = ["http"] | |
network_mode = "host" | |
volumes = ["/home/pi/nomad/data/homebridge:/homebridge"] | |
} | |
resources { | |
cpu = 100 | |
memory = 256 | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "pihole" { | |
datacenters = ["dc1"] | |
group "pi" { | |
network { | |
port "dns" { | |
static = "53" | |
to = "53" | |
} | |
port "http" { | |
to = "80" | |
} | |
} | |
task "server" { | |
driver = "docker" | |
env { | |
TZ = "America/Denver" | |
WEBPASSWORD = "secret" | |
} | |
config { | |
image = "pihole/pihole:latest" | |
ports = ["http", "dns"] | |
mounts = [ | |
{ | |
type = "bind" | |
target = "/etc/pihole" | |
source = "/home/pi/nomad/data/pihole/pihole" | |
readonly = false | |
}, | |
{ | |
type = "bind" | |
target = "/etc/dnsmasq.d" | |
source = "/home/pi/nomad/data/pihole/dnsmasq.d" | |
readonly = false | |
}, | |
] | |
dns_servers = [ | |
"127.0.0.1", | |
"8.8.8.8", | |
] | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment