Skip to content

Instantly share code, notes, and snippets.

@avinson
Created April 29, 2016 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avinson/ae6c0d9bf5f0d3dce61fa192d937c759 to your computer and use it in GitHub Desktop.
Save avinson/ae6c0d9bf5f0d3dce61fa192d937c759 to your computer and use it in GitHub Desktop.
# Define a job
job "demo" {
# Spread tasks between us-west-1 and us-east-1
datacenters = ["it-us-west-2"]
type = "service"
# Create a web front end using a docker image
task "nginx" {
driver = "docker"
config {
image = "nginx"
port "http" {}
port_map { http = 80 }
}
service {
name = "jakeisdecent"
port = "http"
tags = ["rest"]
}
# this is just to tell registrator to ignore this nomad job
env {
SERVICE_80_IGNORE = "true"
}
resources {
cpu = 500
memory = 128
network {
mbits = 100
port "http" {
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment