From eb2184bbb732e118e4be6ea05a67455128046f62 Mon Sep 17 00:00:00 2001 From: vincent Date: Thu, 28 Apr 2022 22:56:08 +0200 Subject: [PATCH] add tt-rss job --- tt-rss.nomad | 147 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 tt-rss.nomad diff --git a/tt-rss.nomad b/tt-rss.nomad new file mode 100644 index 0000000..8821fe2 --- /dev/null +++ b/tt-rss.nomad @@ -0,0 +1,147 @@ +job "tt-rss" { + datacenters = ["homelab"] + type = "service" + + + group "tt-rss" { + ephemeral_disk { + migrate = true + size = 200 + sticky = true + } + network { + mode = "host" + port "http"{ + to = 80 + } + port "appPort" { + to = 9000 + } + } + vault { + policies = ["access-tables"] + } + service { + name = "tt-rss" + port = "http" + tags = [ + "traefik.enable=true", + "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`rss.ducamps.win`)", + "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=${NOMAD_JOB_NAME}.ducamps.win", + "traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver", + ] + } + + + task "app" { + driver = "docker" + config { + image = "cthulhoo/ttrss-fpm-pgsql-static" + ports = [ + "appPort" + ] + volumes = [ + "${NOMAD_ALLOC_DIR}/data:/var/www/html" + ] + } + env { + TTRSS_DB-TYPE = "pgsql" + TTRSS_DB_HOST = "db1.ducamps.win" + TTRSS_DB_NAME = "ttrss" + TTRSS_DB_USER = "ttrss" + TTRSS_SELF_URL_PATH = "https://rss.ducamps.win/tt-rss" + } + template { + data= <