From 05170d6365e6e072f5ebc3e6d6a4eb507c6681f8 Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Wed, 29 Nov 2023 06:21:26 +0000 Subject: [PATCH] Beancount & Fava config. --- services/beancount.hcl | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 services/beancount.hcl diff --git a/services/beancount.hcl b/services/beancount.hcl new file mode 100644 index 0000000..2103c81 --- /dev/null +++ b/services/beancount.hcl @@ -0,0 +1,44 @@ +job "beancount" { + datacenters = ["alo"] + + # force each evaluation to be different, so that the jobspec changes, so that the latest image is pulled + # otherwise, nomad run ends up not doing anything even if the latest image is different + meta { + uuid = uuidv4() + } + + group "web" { + network { + port "http" { + to = 5000 + } + } + + task "fava" { + driver = "docker" + + config { + image = "gitea.v.paler.net/ppetru/fava:latest" + ports = ["http"] + volumes = [ + "/data/compute/appdata/beancount:/beancount", + ] + } + + env { + BEANCOUNT_FILE = "/beancount/pi.beancount" + } + + service { + name = "finances" + port = "http" + + tags = [ + "traefik.enable=true", + "traefik.http.routers.finances.entryPoints=websecure", + "traefik.http.routers.finances.middlewares=authentik@file", + ] + } + } + } +}