mirror of
https://github.com/kemko/nomad.git
synced 2026-01-03 17:05:43 +03:00
This directory and its subdirectories (packages) contain files licensed with the MPLv2 `LICENSE` file in this directory and are intentionally licensed separately from the BSL `LICENSE` file at the root of this repository. Co-authored-by: hashicorp-copywrite[bot] <110428419+hashicorp-copywrite[bot]@users.noreply.github.com>
46 lines
790 B
HCL
46 lines
790 B
HCL
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
job "example" {
|
|
datacenters = ["dc1"]
|
|
|
|
group "cache" {
|
|
|
|
count = 2
|
|
|
|
volume "volume0" {
|
|
type = "csi"
|
|
source = "test-volume"
|
|
attachment_mode = "file-system"
|
|
access_mode = "single-node-reader-only" # alt: "single-node-writer"
|
|
read_only = true
|
|
per_alloc = true
|
|
}
|
|
|
|
network {
|
|
port "db" {
|
|
to = 6379
|
|
}
|
|
}
|
|
|
|
task "redis" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "redis:7"
|
|
ports = ["db"]
|
|
}
|
|
|
|
volume_mount {
|
|
volume = "volume0"
|
|
destination = "${NOMAD_ALLOC_DIR}/volume0"
|
|
}
|
|
|
|
resources {
|
|
cpu = 500
|
|
memory = 256
|
|
}
|
|
}
|
|
}
|
|
}
|