nomad

HCL and Docker files for Nomad deployments
git clone https://git.in0rdr.ch/nomad.git
Log | Files | Refs | Pull requests |Archive

commit a99002c236a9d6cccfa787ae22d6692a7617faaf
parent d370d92bfa193910aadd1e4fb0d534090005f5e0
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Sat, 20 Sep 2025 22:47:35 +0200

feat: add waldhart caldav sync

Diffstat:
Ahcl/default/waldhart/waldhart.nomad | 50++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+), 0 deletions(-)

diff --git a/hcl/default/waldhart/waldhart.nomad b/hcl/default/waldhart/waldhart.nomad @@ -0,0 +1,50 @@ +job "waldhart" { + datacenters = ["dc1"] + type = "batch" + + vault {} + + periodic { + crons = [ + "@daily" + ] + } + + group "waldhart" { + count = 1 + + task "update-availability" { + driver = "podman" + + template { + env = true + destination = "${NOMAD_SECRETS_DIR}/env" + data = <<EOT +WALDHART_URL={{with secret "kv/waldhart"}}{{index .Data.data.waldhart_url}}{{end}} +WALDHART_USERNAME={{with secret "kv/waldhart"}}{{index .Data.data.waldhart_username}}{{end}} +WALDHART_PASSWORD={{with secret "kv/waldhart"}}{{index .Data.data.waldhart_password}}{{end}} +CALDAV_URL={{with secret "kv/waldhart"}}{{index .Data.data.caldav_url}}{{end}} +CALDAV_CALENDAR_NAME=Skischule +CALDAV_USERNAME={{with secret "kv/waldhart"}}{{index .Data.data.caldav_username}}{{end}} +CALDAV_PASSWORD="{{with secret "kv/waldhart"}}{{index .Data.data.caldav_password}}{{end}}" +SEASON=2025 # December - March next year +#PYTHON_CALDAV_DEBUGMODE=DEBUG +#LOGLEVEL=DEBUG +EOT + } + + config { + image = "127.0.0.1:5000/waldhart:latest" + #command = "/bin/sh" + #args = ["-c", "sleep 3600"] + force_pull = true + } + + resources { + memory = 50 + memory_max = 128 + cpu = 200 + } + } + } +}