mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 17:05:43 +03:00
41 lines
605 B
HCL
41 lines
605 B
HCL
job "example" {
|
|
datacenters = ["dc1"]
|
|
|
|
group "cache" {
|
|
task "redis" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "redis:3.2"
|
|
|
|
port_map {
|
|
db = 6379
|
|
}
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 256
|
|
|
|
network {
|
|
mbits = 10
|
|
port "db" {}
|
|
}
|
|
}
|
|
|
|
service {
|
|
name = "redis-cache"
|
|
tags = ["global", "cache"]
|
|
port = "db"
|
|
|
|
check {
|
|
name = "alive"
|
|
type = "tcp"
|
|
interval = "10s"
|
|
timeout = "2s"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|