-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.hcl
60 lines (51 loc) · 1.09 KB
/
example.hcl
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
56
57
58
59
60
job "example" {
datacenters = ["dc1"]
group "example" {
count = 5
update {
max_parallel = 1
min_healthy_time = "5s"
healthy_deadline = "5m"
progress_deadline = "10m"
auto_revert = true
}
task "example" {
driver = "docker"
# kill_timeout = "120s"
# kill_signal = "SIGTERM"
# shutdown_delay = "10s"
config {
image = "alexes/service:v1"
network_mode = "host"
args = ["/app", "-listen-addr", "${NOMAD_ADDR_http}"]
}
resources {
cpu = 500
memory = 256
network {
mbits = 1
port "http" {}
}
}
env {
NOMAD_ALLOC_ID = "v7 ${NOMAD_ALLOC_INDEX}"
}
service {
name = "example"
port = "http"
tags = [
"traefik.enable=true",
"traefik.frontends.A.rule=Host:localhost",
"metrics"
]
check {
name = "alive"
type = "http"
path = "/"
interval = "5s"
timeout = "2s"
}
}
}
}
}