forked from angrycub/nomad_example_jobs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfoo-test.nomad
55 lines (46 loc) · 958 Bytes
/
foo-test.nomad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
job "foo-service" {
datacenters = ["dc1"]
meta {
foo-service = "true"
}
group "example" {
count = 3
network {
port "http" {}
}
service {
name = "foo-service"
tags = ["urlprefix-/foo"]
port = "http"
check {
type = "http"
name = "health-check"
interval = "15s"
timeout = "5s"
path = "/"
}
}
service {
name = "foo-service-2"
tags = ["urlprefix-/foo2"]
port = "http"
check {
type = "http"
name = "health-check"
interval = "15s"
timeout = "5s"
path = "/"
}
}
task "server" {
driver = "exec"
config {
command = "usr/sbin/http-echo"
args = [
"-listen", ":${NOMAD_PORT_http}",
"-text", "<html><body><h1>Welcome to the Foo Service.</h1><hr />You are on ${NOMAD_IP_http}.</body></html>",
]
}
}
}
}