homelab/nomad-job/filestash.nomad

70 lines
1.5 KiB
Plaintext
Raw Normal View History

2022-05-24 13:51:44 +00:00
job "filestash" {
2024-01-27 08:35:47 +00:00
datacenters = ["homelab"]
2022-12-10 16:10:32 +00:00
priority = 50
2022-10-29 08:40:01 +00:00
type = "service"
2022-05-24 13:51:44 +00:00
meta {
forcedeploy = "0"
}
constraint {
attribute = "${attr.cpu.arch}"
2022-10-29 08:40:01 +00:00
value = "amd64"
2022-05-24 13:51:44 +00:00
}
2024-02-21 18:03:31 +00:00
constraint {
attribute = "${node.class}"
operator = "set_contains"
value = "cluster"
}
2022-05-24 13:51:44 +00:00
2022-10-29 08:40:01 +00:00
group "filestash" {
2022-05-24 13:51:44 +00:00
network {
mode = "host"
port "http" {
to = 8334
}
2022-10-29 08:40:01 +00:00
port "onlyoffice" {
2022-05-24 13:51:44 +00:00
to = 80
}
}
task "filestash" {
driver = "docker"
service {
name = "filestash"
port = "http"
tags = [
2022-10-29 08:40:01 +00:00
"homer.enable=true",
"homer.name=FileStash",
"homer.service=Application",
2023-11-05 18:08:17 +00:00
"homer.url=http://file.ducamps.eu",
"homer.logo=http://file.ducamps.eu/assets/logo/apple-touch-icon.png",
2022-10-29 08:40:01 +00:00
"homer.target=_blank",
"traefik.enable=true",
2023-11-05 18:08:17 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`file.ducamps.eu`)",
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=file.ducamps.eu",
2022-10-29 08:40:01 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
2023-10-07 16:40:40 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure",
2022-05-24 13:51:44 +00:00
]
}
config {
2024-03-17 17:58:24 +00:00
image = "docker.service.consul:5000/machines/filestash"
2022-05-24 13:51:44 +00:00
ports = ["http"]
volumes = [
"/mnt/diskstation/nomad/filestash:/app/data/state"
]
}
env {
2022-10-29 08:40:01 +00:00
APPLICATION_URL = ""
2022-05-24 13:51:44 +00:00
}
resources {
2022-10-29 08:40:01 +00:00
cpu = 100
2022-05-24 13:51:44 +00:00
memory = 300
}
}
}
}