diff --git a/nomad-job/actualbudget.nomad b/nomad-job/actualbudget.nomad new file mode 100644 index 0000000..d9caddd --- /dev/null +++ b/nomad-job/actualbudget.nomad @@ -0,0 +1,62 @@ + +job "actualbudget" { + datacenters = ["homelab"] + priority = 50 + type = "service" + meta { + forcedeploy = "0" + } + constraint { + attribute = "${attr.cpu.arch}" + value = "amd64" + } + constraint { + attribute = "${node.class}" + operator = "set_contains" + value = "cluster" + } + group "actualbudget"{ + network { + mode = "host" + port "http" { + to = 5006 + } + } + task "actualbudget-server" { + driver = "docker" + service { + name = "actualbudget" + port = "http" + tags = [ + "traefik.enable=true", + "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`budget.ducamps.eu`)", + "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=budget.ducamps.eu", + "traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver", + "traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure", + "homer.enable=true", + "homer.name=${NOMAD_TASK_NAME}", + "homer.service=Application", + "homer.target=_blank", + "homer.logo=https://budget.ducamps.eu/icon.png", + "homer.url=https://budget.ducamps.eu", + + ] + } + config { + image = "ghcr.io/actualbudget/actual-server:latest" + ports = ["http"] + volumes = [ + "/mnt/diskstation/nomad/actualbudget:/data" + ] + + } + env { + } + + resources { + memory = 300 + } + } + + } +} diff --git a/terraform/dns/variable.tf b/terraform/dns/variable.tf index d8739bf..e534f4b 100644 --- a/terraform/dns/variable.tf +++ b/terraform/dns/variable.tf @@ -35,7 +35,8 @@ variable cnameList{ "vikunja", "www", "mail", - "ldap" + "ldap", + "budget" ] }