-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathredis.nomad.hcl
59 lines (48 loc) · 941 Bytes
/
redis.nomad.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
job "redis" {
datacenters = ["eu-west-2a","eu-west-2b","eu-west-2c","eu-west-2","dc1"]
type = "service"
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "3m"
auto_revert = false
canary = 0
}
group "cache" {
count = 1
restart {
attempts = 10
interval = "5m"
delay = "25s"
mode = "delay"
}
ephemeral_disk {
size = 300
}
network {
mode = "bridge"
port "db" {
to = 6379
}
}
task "redis" {
driver = "docker"
config {
image = "redis"
ports = ["db"]
}
resources {
cpu = 500 # 500 MHz
memory = 256 # 256MB
}
}
service {
name = "redis"
tags = ["global", "cache", "urlprefix-/redis" ]
port = "db"
connect {
sidecar_service {}
}
}
}
}