Created
April 29, 2016 21:48
-
-
Save avinson/ae6c0d9bf5f0d3dce61fa192d937c759 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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