Skip to content

Instantly share code, notes, and snippets.

@dradtke
Created June 28, 2019 22:04
Show Gist options
  • Save dradtke/7a3d6477666c05e4558b990630c5a5ca to your computer and use it in GitHub Desktop.
Save dradtke/7a3d6477666c05e4558b990630c5a5ca to your computer and use it in GitHub Desktop.
Nomad job for damienradtke.com
job "damienradtkecom" {
region = "us"
datacenters = ["us-central"]
type = "service"
group "server" {
count = 1
task "server" {
driver = "exec"
config {
command = "hugo"
args = [
"server",
"--config=local/blog/config.toml",
"--watch=false",
"--bind=0.0.0.0",
"--port=${NOMAD_PORT_http}",
"--contentDir=local/blog/content",
"--layoutDir=local/blog/layouts",
"--themesDir=local/blog/themes",
]
}
artifact {
source = "github.com/dradtke/blog"
destination = "local/blog/"
options {
ref = "d60dd4a75d7d4015e6d0109e15e3fb46d31cd6bc"
}
}
artifact {
source = "https://github.com/gohugoio/hugo/releases/download/v0.55.6/hugo_0.55.6_Linux-64bit.tar.gz"
options {
checksum = "sha256:39d3119cdb9ba5d6f1f1b43693e707937ce851791a2ea8d28003f49927c428f4"
}
}
resources {
network {
port "http" {}
}
}
service {
name = "${JOB}-${TASK}"
port = "http"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment