forked from Deuxfleurs/nixcfg
66 lines
1.3 KiB
HCL
66 lines
1.3 KiB
HCL
job "dummy-nginx" {
|
|
datacenters = ["neptune"]
|
|
type = "service"
|
|
|
|
group "nginx" {
|
|
count = 1
|
|
|
|
volume "nix-store" {
|
|
type = "host"
|
|
source = "nix-store"
|
|
read_only = true
|
|
}
|
|
volume "nix-current-system-bin" {
|
|
type = "host"
|
|
source = "nix-current-system-bin"
|
|
read_only = true
|
|
}
|
|
|
|
network {
|
|
port "http" {
|
|
to = 8080
|
|
}
|
|
}
|
|
|
|
task "not-actually-nginx" {
|
|
driver = "exec"
|
|
config {
|
|
command = "env"
|
|
args = [
|
|
"/run/current-system/sw/bin/nix-shell",
|
|
"--run", "python3 -m http.server 8080"
|
|
]
|
|
}
|
|
env = {
|
|
NIX_PATH = "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "nix-store"
|
|
destination = "/nix"
|
|
}
|
|
volume_mount {
|
|
volume = "nix-current-system-bin"
|
|
destination = "/run/current-system/sw/bin"
|
|
}
|
|
|
|
template {
|
|
data = file("shell.nix")
|
|
destination = "shell.nix"
|
|
}
|
|
}
|
|
|
|
service {
|
|
port = "http"
|
|
tags = [
|
|
"tricot home.adnab.me 100",
|
|
]
|
|
check {
|
|
type = "http"
|
|
path = "/"
|
|
interval = "10s"
|
|
timeout = "2s"
|
|
}
|
|
}
|
|
}
|
|
}
|