tomasrivera.ch {
  root * /srv/www
  file_server
}

archive.tomasrivera.ch {
    reverse_proxy archivebox:8000
}
hledger.tomasrivera.ch {
  log {
    output stdout
  }
  basic_auth {
    tomasr {$HLEDGER_PASSWORD_HASH}
  }
  reverse_proxy host.docker.internal:5000
}
rss.tomasrivera.ch {
  reverse_proxy freshrss:80
}

status.tomasrivera.ch {
  reverse_proxy uptime-kuma:3001
}

ntfy.tomasrivera.ch {
  reverse_proxy ntfy:80
}

notes.tomasrivera.ch {
  reverse_proxy flatnotes:8080
}

calendar.tomasrivera.ch {
  reverse_proxy radicale:5232
}

metube.tomasrivera.ch {
  basic_auth {
    tomasr {$METUBE_PASSWORD_HASH}
  }
  reverse_proxy metube:8081
}

videos.tomasrivera.ch {
  reverse_proxy jellyfin:8096
}

convert.tomasrivera.ch {
  reverse_proxy transmute:3313
}

git.tomasrivera.ch {
  reverse_proxy gitea:3000
}

resspublica.tomasrivera.ch {

    root * /srv/resspublica

    @rss {
        path /feed/rss/*
    }

    handle @rss {
        header Content-Type "application/rss+xml; charset=utf-8"
        file_server
    }

    @atom {
        path /feed/atom/*
    }

    handle @atom {
        header Content-Type "application/atom+xml; charset=utf-8"
        file_server
    }

    @images {
        path /images/*
    }

    handle @images {
        file_server
    }

    handle {
        respond "404 Not Found" 404
    }
}
