60 lines
1.1 KiB
HCL
60 lines
1.1 KiB
HCL
job "pi.paler.net" {
|
|
datacenters = ["alo"]
|
|
|
|
group "apps" {
|
|
network {
|
|
port "http" {
|
|
#host_network = "tailscale"
|
|
}
|
|
}
|
|
|
|
service {
|
|
name = "pi-paler-net"
|
|
port = "http"
|
|
|
|
tags = [
|
|
"traefik.enable=true",
|
|
"traefik.http.routers.piserver.entryPoints=websecure",
|
|
"traefik.http.routers.piserver.rule=Host(`pi.paler.net`)",
|
|
]
|
|
|
|
check {
|
|
type = "http"
|
|
path = "/health"
|
|
interval = "10s"
|
|
timeout = "2s"
|
|
}
|
|
}
|
|
|
|
volume "sites-volume" {
|
|
type = "csi"
|
|
source = "sites-volume"
|
|
access_mode = "single-node-reader-only"
|
|
read_only = true
|
|
attachment_mode = "file-system"
|
|
}
|
|
|
|
task "http-server" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "pierrezemb/gostatic"
|
|
|
|
ports = [ "http" ]
|
|
|
|
args = [
|
|
"-port=${NOMAD_PORT_http}",
|
|
"-path=/srv/http/pi.paler.net",
|
|
"-enable-health",
|
|
]
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "sites-volume"
|
|
destination = "/srv/http"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|