-
Notifications
You must be signed in to change notification settings - Fork 6
/
example-docker.nomad
101 lines (81 loc) · 1.86 KB
/
example-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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
job "redis" {
datacenters = ["dc1"]
type = "service"
update {
canary = 1
max_parallel = 1
healthy_deadline = "8m"
progress_deadline = "10m"
}
group "redis" {
count = 5
task "redis" {
driver = "triton"
resources {
cpu = 20
memory = 10
}
service {
name = "${TASKGROUP}-redis"
tags = ["global", "cache"]
port = 6379
address_mode = "driver"
check {
name = "alive"
type = "tcp"
interval = "10s"
timeout = "2s"
address_mode = "driver"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
config {
api_type = "docker_api"
docker_api {
public_network = "sdc_nat"
private_network = "My-Fabric-Network"
labels {
group = "webservice-cache"
bob.bill.john = "label"
test = "test"
}
ports {
tcp = [
6379,
]
}
image {
name = "redis"
tag = "latest"
auto_pull = true
}
}
package {
name = "sample-512M"
}
fwenabled = false
cns = [
"redis",
]
tags = {
redis = "true"
}
fwrules {
anytoredis = "FROM any TO tag redis ALLOW tcp PORT 6379"
redistcp = "FROM tag redis TO tag redis ALLOW tcp PORT all"
redisudp = "FROM tag redis TO tag redis ALLOW udp PORT all"
}
}
env {
envtest = "test"
}
meta {
my-key = "my-value"
}
}
}
}