Git Product home page Git Product logo

adbir's Introduction

adbir

Another Dashboard But In Rust

About

A dashboard inspired by Homer, both in design and configuration.

While I enjoy the configurability and relatively minimalist design of Homer, I dislike its hard dependency on JavaScript to render the page. This is a stripped down rewrite of Homer without any JavaScript.

Configuring

Runtime arguments to configure the program can be provided either with CLI arguments or environment variables.

Usage: adbir [OPTIONS]

Options:
      --out-dir <OUT_DIR>          directory to output generated resources [env: OUT_DIR=] [default: ./out]
      --config-path <CONFIG_PATH>  path to config file [env: CONFIG_PATH=] [default: ./config.yaml]
  -h, --help                       Print help
  -V, --version                    Print version

The config file is inspired by a subset of Homer configuration options.

Root

Field Description
title Title of the dashboard
subtitle Subtitle of the dashboard displayed underneath title
services List of service groups

.services

Field Description
name Name of service group
items List of service groups

.services.items

Field Description
name Name of service
subtitle Description of service
url URL to the service
logo Logo of the service to display

Example

title: Dashboard
subtitle: A list of services

services:
  - name: Application group
    items:
      - name: Selfhosted app
        url: https://selfhosted.local
        logo: /icons/svg/files.svg
        subtitle: Cool selfhosted app
      - name: Another selfhosted app
        url: https://otherselfhosted.local
        logo: /icons/svg/another.svg
        subtitle: Another cool selfhosted app
  - name: Another application group
    items:
      - name: Other app
        url: https://otherapp.local
        logo: /icons/svg/other.svg
        subtitle: Another app

Running

Pre-built binary

Download the latest binary from the releases. Then, run:

$ adbir
Started with args: Args { out_dir: "./out", config_path: "./config.yaml" }
Reading from ./config.yaml
Opening output directory file
Rending and writing template to output file
$

This will generate a static index.html in the desired output directory. Upload this file to your desired webserver to serve.

Docker container

The Docker container generates the static files on startup and serves them using a bundled lightweight webserver (darkhttpd). The webserver serves files from /public in the container.

An example docker-compose.yaml.

---
version: '2'

services:
  adbir:
    image: registry.wuhoo.xyz/jerry/adbir:v0.1.0
    environment:
      OUT_DIR: /public
      CONFIG_PATH: /config.yaml
    ports:
      - "8080:8080"
    volumes:
      - ./config.yaml:/config.yaml

Then run:

$ docker-compose up -d
$

Building from source

$ cargo run --release
    Finished release [optimized] target(s) in 0.02s
     Running `target/release/adbir`
Started with args: Args { out_dir: "./out", config_path: "./config.yaml" }
Reading from ./config.yaml
Opening output directory file
Rending and writing template to output file
$

adbir's People

Contributors

geraldwuhoo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.