2022-04-05 05:20:19 +00:00
|
|
|
job "multimedia" {
|
|
|
|
datacenters = ["dc1"]
|
|
|
|
type = "service"
|
|
|
|
|
|
|
|
group "multimedia" {
|
|
|
|
count = 1
|
|
|
|
|
|
|
|
network {
|
|
|
|
mode = "bridge"
|
|
|
|
port "web" {
|
2023-03-24 23:32:37 +00:00
|
|
|
host_network = "wesher"
|
2022-04-05 05:20:19 +00:00
|
|
|
to = 80
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
volume "media-read" {
|
|
|
|
type = "host"
|
|
|
|
read_only = true
|
|
|
|
source = "media-read"
|
|
|
|
}
|
|
|
|
|
|
|
|
service {
|
|
|
|
name = "library"
|
2023-03-24 18:24:36 +00:00
|
|
|
provider = "nomad"
|
2022-04-05 05:20:19 +00:00
|
|
|
port = "web"
|
|
|
|
|
|
|
|
tags = [
|
|
|
|
"traefik.enable=true",
|
|
|
|
"traefik.http.routers.library.entryPoints=websecure",
|
|
|
|
]
|
|
|
|
}
|
2022-04-13 21:01:14 +00:00
|
|
|
|
2022-04-05 05:20:19 +00:00
|
|
|
task "main" {
|
|
|
|
driver = "docker"
|
|
|
|
|
|
|
|
volume_mount {
|
|
|
|
volume = "media-read"
|
|
|
|
destination = "/mnt/media"
|
|
|
|
read_only = true
|
|
|
|
}
|
2022-04-13 21:01:14 +00:00
|
|
|
|
2022-04-05 05:20:19 +00:00
|
|
|
config {
|
|
|
|
image = "caddy"
|
|
|
|
args = [
|
|
|
|
"caddy",
|
|
|
|
"file-server",
|
|
|
|
"--root",
|
|
|
|
"/mnt/media",
|
|
|
|
"--browse",
|
|
|
|
]
|
|
|
|
ports = ["web"]
|
|
|
|
}
|
|
|
|
|
|
|
|
resources {
|
|
|
|
cpu = 50
|
|
|
|
memory = 250
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|