65f7abf2f4
Closes #12927 Closes #12958 This PR updates the version of redis used in our examples from 3.2 to 7. The old version is very not supported anymore, and we should be setting a good example by using a supported version. The long-form example job is now fixed so that the service stanza uses nomad as the service discovery provider, and so now the job runs without a requirement of having Consul running and configured.
40 lines
625 B
HCL
40 lines
625 B
HCL
job "example" {
|
|
datacenters = ["dc1"]
|
|
|
|
group "cache" {
|
|
volume "test" {
|
|
type = "csi"
|
|
source = "${volume_id}"
|
|
access_mode = "single-node-writer"
|
|
attachment_mode = "block-device"
|
|
}
|
|
|
|
task "redis" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "redis:7"
|
|
|
|
port_map {
|
|
db = 6379
|
|
}
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "test"
|
|
destination = "/test"
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 256
|
|
|
|
network {
|
|
mbits = 14
|
|
port "db" {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|