2019-08-14 14:23:33 +00:00
|
|
|
job "example" {
|
|
|
|
datacenters = ["dc1"]
|
|
|
|
|
|
|
|
group "cache" {
|
2020-09-16 15:06:19 +00:00
|
|
|
network {
|
|
|
|
port "db" {
|
|
|
|
to = 6379
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-08-14 14:23:33 +00:00
|
|
|
task "redis" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
config {
|
|
|
|
image = "redis:3.2"
|
|
|
|
|
2020-09-16 15:06:19 +00:00
|
|
|
ports = ["db"]
|
2019-08-14 14:23:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 500
|
|
|
|
memory = 256
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|