job "tt-rss" { datacenters = ["homelab"] priority = 90 type = "service" constraint { attribute = "${attr.cpu.arch}" value = "amd64" } group "ttrss" { ephemeral_disk { migrate = true size = 200 sticky = true } network { mode = "host" port "http" { to = 80 } port "appPort" { to = 9000 } } vault { policies = ["ttrss"] } service { name = "tt-rss" port = "http" tags = [ "homer.enable=true", "homer.name=TT-RSS", "homer.service=Application", "homer.logo=https://framalibre.org/sites/default/files/styles/thumbnail/public/leslogos/ic_launcher_1.png", "homer.target=_blank", "homer.url=https://www.ducamps.win/tt-rss", "traefik.enable=true", "traefik.http.routers.${NOMAD_JOB_NAME}.rule=Host(`www.ducamps.win`)&&PathPrefix(`/tt-rss`)", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.domains[0].sans=www.ducamps.win", "traefik.http.routers.${NOMAD_JOB_NAME}.tls.certresolver=myresolver", "traefik.http.routers.${NOMAD_JOB_NAME}.entrypoints=web,websecure", ] } task "ttrss-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 = "active.db.service.consul" TTRSS_DB_NAME = "ttrss" TTRSS_DB_USER = "ttrss" TTRSS_SELF_URL_PATH = "https://www.ducamps.win/tt-rss" } template { data = <