Replace the volume test with a useful file browser
This commit is contained in:
78
2-nomad-config/transfer.nomad.hcl
Normal file
78
2-nomad-config/transfer.nomad.hcl
Normal file
@@ -0,0 +1,78 @@
|
||||
job "transfer" {
|
||||
group "transfer" {
|
||||
network {
|
||||
port "http" {
|
||||
to = 80
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
name = "transfer"
|
||||
port = "http"
|
||||
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.transfer.middlewares=auth@file",
|
||||
]
|
||||
|
||||
check {
|
||||
type = "http"
|
||||
path = "/"
|
||||
interval = "10s"
|
||||
timeout = "2s"
|
||||
}
|
||||
}
|
||||
|
||||
volume "unraid_transfer_use" {
|
||||
type = "csi"
|
||||
read_only = false
|
||||
source = "unraid_transfer_id5"
|
||||
access_mode = "single-node-writer"
|
||||
attachment_mode = "file-system"
|
||||
}
|
||||
|
||||
task "filebrowser" {
|
||||
driver = "docker"
|
||||
|
||||
config {
|
||||
# Use the s6 tag for the linuxserver.io based image
|
||||
image = "filebrowser/filebrowser:s6"
|
||||
|
||||
ports = ["http"]
|
||||
|
||||
volumes = [
|
||||
"local/config/settings.json:/config/settings.json",
|
||||
]
|
||||
}
|
||||
|
||||
volume_mount {
|
||||
volume = "unraid_transfer_use"
|
||||
destination = "/srv"
|
||||
read_only = false
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 500
|
||||
memory = 256
|
||||
}
|
||||
|
||||
template {
|
||||
data = <<EOF
|
||||
{
|
||||
"port": 80,
|
||||
"baseURL": "",
|
||||
"address": "",
|
||||
"log": "stdout",
|
||||
"database": "/database/filebrowser.db",
|
||||
"root": "/srv",
|
||||
"auth": {
|
||||
"method": "noauth"
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
destination = "local/config/settings.json"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user