-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker.nomad
50 lines (41 loc) · 858 Bytes
/
docker.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
job "docker" {
datacenters = ["dc1"]
type = "service"
group "docker" {
count = 3
task "webservice" {
driver = "docker"
resources {
network {
port "db" {}
}
}
service {
name = "${TASKGROUP}-redis"
tags = ["global", "cache"]
port = "db"
address_mode = "driver"
check {
name = "alive"
type = "tcp"
interval = "10s"
timeout = "2s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
config {
image = "redis:3.2"
port_map = {
db = 6379
}
labels {
group = "webservice-cache"
}
}
}
}
}