-
Notifications
You must be signed in to change notification settings - Fork 1
/
redis-podman.hcl
49 lines (48 loc) · 1.01 KB
/
redis-podman.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
variable "redis_version" {
type = string
default = "6.0"
description = "version of redis to run"
}
job "redis" {
datacenters = ["dc1"]
type = "service"
migrate {
max_parallel = 1
health_check = "checks"
min_healthy_time = "10s"
healthy_deadline = "5m"
}
update {
max_parallel = 2
health_check = "checks"
min_healthy_time = "10s"
healthy_deadline = "5m"
progress_deadline = "10m"
auto_revert = true
auto_promote = true
canary = 1
stagger = "30s"
}
group "cache" {
network {
port "redis" { to = 6379 }
}
service {
tags = ["cache","redis","urlprefix-/redis"]
port = "redis"
check {
name = "redis_probe"
type = "tcp"
interval = "10s"
timeout = "1s"
}
}
task "redis" {
driver = "podman"
config {
image = "docker://redis:${var.redis_version}"
ports = ["redis"]
}
}
}
}