homelab/nomad-job/radicale.nomad

78 lines
2.1 KiB
Plaintext
Raw Permalink Normal View History

2022-05-05 20:07:51 +00:00
job "radicale" {
2022-10-17 19:44:55 +00:00
datacenters = ["homelab"]
2022-12-10 16:10:32 +00:00
priority = 70
2022-10-29 08:40:01 +00:00
type = "service"
2022-05-05 20:07:51 +00:00
meta {
forcedeploy = "0"
}
2022-10-29 08:40:01 +00:00
group "radicale" {
2022-05-05 20:07:51 +00:00
network {
mode = "host"
port "http" {
to = 5232
}
}
2022-05-12 09:36:04 +00:00
task "radicale" {
2022-05-05 20:07:51 +00:00
driver = "docker"
service {
name = "radicale"
port = "http"
tags = [
2022-10-29 08:40:01 +00:00
"homer.enable=true",
"homer.name=Radicale",
"homer.service=Application",
"homer.logo=https://radicale.org/assets/logo.svg",
"homer.target=_blank",
2023-11-05 18:08:17 +00:00
"homer.url=https://www.ducamps.eu/${NOMAD_JOB_NAME}",
2022-05-23 19:44:34 +00:00
2022-10-29 08:40:01 +00:00
"traefik.enable=true",
2023-11-05 18:08:17 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`www.ducamps.eu`)&&PathPrefix(`/radicale`)",
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=www.ducamps.eu",
2022-10-29 08:40:01 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver",
"traefik.http.routers.${NOMAD_JOB_NAME}.middlewares=radicaleHeader,radicalestrip",
2023-10-07 16:40:40 +00:00
"traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure",
2022-10-29 08:40:01 +00:00
"traefik.http.middlewares.radicaleHeader.headers.customrequestheaders.X-Script-Name=/radicale",
"traefik.http.middlewares.radicalestrip.stripprefix.prefixes=/radicale",
2022-05-05 20:07:51 +00:00
]
}
config {
image = "tomsquest/docker-radicale"
ports = ["http"]
volumes = [
"local/config:/config/config",
"/mnt/diskstation/CardDav:/data"
]
}
env {
2022-10-29 08:40:01 +00:00
TAKE_FILE_OWNERSHIP = false
2022-05-05 20:07:51 +00:00
}
template {
2022-10-29 08:40:01 +00:00
data = <<EOH
2022-05-05 20:07:51 +00:00
[server]
hosts = 0.0.0.0:5232
[auth]
type = htpasswd
htpasswd_encryption = md5
htpasswd_filename = /data/users.htpasswd
delay = 1
[rights]
type = from_file
file = /data/rights.conf
[storage]
type = multifilesystem
filesystem_folder = /data/collections
EOH
destination = "local/config"
}
2022-05-12 09:36:04 +00:00
resources {
memory = 100
}
2022-05-05 20:07:51 +00:00
}
}
}