Giter Site home page Giter Site logo

script-dashboard's Introduction

Header

Introduction

Black Formatter Tailwindcss

This repository contains a simple script management dashboard created using Flask and Tailwindcss. It's main purpose is to allow to easily install and monitor scripts on a given host with crontab or systemd integration without the need to use ssh and scp to deploy anything.

Quickstart

Just follow these steps to host the service (don't make it publicly available):

  1. Checkout the repository git clone https://github.com/TumbleOwlee/script-dashboard.git and change directory cd script-dashboard
  2. Create local python environment and activate it: python3 -m venv ./pyenv && source ./pyenv/bin/activate
  3. Install all dependencies: python -m pip install flask flask-login pyyaml simplepam
  4. Generate certificate: openssl req -x509 -newkey rsa:4096 -nodes -out certificate/cert.pem -keyout certificate/key.pem -days 365
  5. Start the service: flask --app main --debug run -h 0.0.0.0 -p 5000 --cert certificate/cert.pem --key certificate/key.pem

Exchange the values for host and port as required. Also if available and possible, use a non-self-signed certificate. Preferably you also switch to a production ready web server as e.g. Gunicorn or Waitress.

DO NOT USE THE TEST CERTIFICATES OF THIS REPOSITORY!

Additionally, you can run it as a systemd managed service using the provided service file template. Just exchange the working directory entry for a valid one and place it in /etc/systemd/system/.

Authentication

Currently this service uses PAM and thus the simple Unix accounts for authentication. It doesn't use a self maintained database or anything else. Since that's the case, the service has to be executed as root. That's a limitation that may be changed in the future but for now that the easiest way to implement account handling. Since users can upload any scripts, the service only executes the provided script as the user itself, never as root.

Scheduling

Currently crontab and systemd are supported for execution handling. Besides that the None option is also provided for all scripts that either only have to be executed once on trigger by the user or scripts that implement the execution scheduling in itself.

Illustations

These images may not be up-to-date.

Login Page

Login

Create Script

Create

Configure Systemd

Systemd

Edit Script

Edit

NotFound Page

NotFound

script-dashboard's People

Contributors

tumbleowlee 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.