This commit is contained in:
54
apps/redis/live.hcl
Normal file
54
apps/redis/live.hcl
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
|
||||||
|
job "redis" {
|
||||||
|
datacenters = ["nummer5"]
|
||||||
|
|
||||||
|
group "cache" {
|
||||||
|
|
||||||
|
count = 1
|
||||||
|
|
||||||
|
volume "volume0" {
|
||||||
|
type = "csi"
|
||||||
|
source = "redis"
|
||||||
|
read_only = false
|
||||||
|
attachment_mode = "file-system"
|
||||||
|
access_mode = "single-node-writer"
|
||||||
|
}
|
||||||
|
|
||||||
|
network {
|
||||||
|
port "redis" {
|
||||||
|
static = 6379
|
||||||
|
}
|
||||||
|
}
|
||||||
|
service {
|
||||||
|
name = "redis"
|
||||||
|
port = "redis"
|
||||||
|
tags = [
|
||||||
|
"traefik.enable=true",
|
||||||
|
"traefik.tcp.routers.redis.rule=HostSNI(`redis.service.nr5`)",
|
||||||
|
# "traefik.tcp.routers.redis.entryPoints=redis",
|
||||||
|
# "traefik.tcp.routers.redis.service=redis",
|
||||||
|
# services (needed for TCP)
|
||||||
|
"traefik.tcp.services.redis.loadbalancer.server.port=6379",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
task "redis" {
|
||||||
|
driver = "podman"
|
||||||
|
|
||||||
|
config {
|
||||||
|
image = "redis"
|
||||||
|
ports = ["redis"]
|
||||||
|
}
|
||||||
|
|
||||||
|
volume_mount {
|
||||||
|
volume = "volume0"
|
||||||
|
destination = "/data"
|
||||||
|
}
|
||||||
|
|
||||||
|
resources {
|
||||||
|
cpu = 500
|
||||||
|
memory = 256
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
21
apps/redis/volume.hcl
Normal file
21
apps/redis/volume.hcl
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
type = "csi"
|
||||||
|
id = "redis"
|
||||||
|
name = "redis"
|
||||||
|
plugin_id = "nfs"
|
||||||
|
external_id = "redis"
|
||||||
|
|
||||||
|
capability {
|
||||||
|
access_mode = "single-node-writer"
|
||||||
|
attachment_mode = "file-system"
|
||||||
|
}
|
||||||
|
|
||||||
|
context {
|
||||||
|
server = "ebin02.wks"
|
||||||
|
share = "/data/raid1-ssd/app-data/redis-data"
|
||||||
|
mountPermissions = "0"
|
||||||
|
}
|
||||||
|
|
||||||
|
mount_options {
|
||||||
|
fs_type = "nfs"
|
||||||
|
mount_flags = [ "timeo=30", "vers=3", "_netdev" , "nolock" ]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user