github.com/hernad/nomad@v1.6.112/drivers/nix/example/example-service.hcl (about) 1 job "nix2-example-service" { 2 datacenters = ["dc1"] 3 type = "service" 4 5 group "example" { 6 # This task defines a server that runs a simple python file server on port 8080, 7 # which allows to explore the contents of the filesystem namespace as visible 8 # by processes that run inside the task. 9 # A bunch of utilities are included as well, so that you can exec into the container 10 # and explore what's inside by yourself. 11 task "nix-python-serve-http" { 12 driver = "nix2" 13 14 config { 15 packages = [ 16 "#python3", 17 "#bash", 18 "#coreutils", 19 "#curl", 20 "#nix", 21 "#git", 22 "#cacert", 23 "#strace", 24 "#gnugrep", 25 "#findutils", 26 "#mount", 27 ] 28 command = "python3" 29 args = [ "-m", "http.server", "8080" ] 30 } 31 env = { 32 SSL_CERT_FILE = "/etc/ssl/certs/ca-bundle.crt" 33 } 34 } 35 } 36 }