Created
February 23, 2023 17:44
-
-
Save schmichael/ac5fd122f7b358a879fcef8c74f6f40b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "example" { | |
group "cache" { | |
network { | |
port "db" { | |
to = 6379 | |
} | |
} | |
task "redis" { | |
driver = "docker" | |
config { | |
image = "redis:7" | |
ports = ["db"] | |
auth_soft_fail = true | |
} | |
identity { | |
env = true | |
file = true | |
} | |
template { | |
change_mode = "signal" | |
destination = "local/template.txt" | |
data = <<EOF | |
consul: {{ key "foo" }} | |
nomad: {{ with nomadVar "nomad/jobs/example/cache/redis" }}{{ .foo }}{{ end }} | |
EOF | |
} | |
resources { | |
cpu = 500 | |
memory = 256 | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment