tsp-web
v1.6.0
Published
Displays a overview of the task spooler server of your machine in real time.
Downloads
26
Readme
tsp-web
Displays a overview of the task spooler server of your machine in real time.
Installation
Production
- Install NodeJS
- Run
sudo npm install -g tsp-web
- To start the server and set to startup
tsp-web start --startup
Development
- Install NodeJS
sudo apt update && sudo apt install -y nodejs nodejs-legacy npm
- Run
npm install && npm start
- Open your browser on
http://localhost:3000
Debian package
In order to create a Debian package you have to:
- Install package dependencies
sudo apt update && sudo apt install -y build-essential fakeroot devscripts
- In the root directory of this project call
debuild -uc -us
- Install your Debian package
sudo dpkg -i ../tsp-web*.deb
- add your user to the tsp group
sudo usermod -aG tsp $USER
- Log out and log back in. This ensures your user is running with the correct permissions.
Try it out with docker
Run the following command:
docker run -d -p "3000:3000" --name "my-tsp-web" ghcr.io/brunnerlivio/tsp-web:master
# Spawn tasks
docker exec -d my-tsp-web /bin/bash -c "tsp -L OK ls && tsp -L NOK foobar && tsp -L WAIT sleep 30"
# Open up on localhost:3000
From Source
Use the Docker file to create your image and play around with tsp-web
- Install Docker, following the instructions https://docs.docker.com/engine/installation/
- Build your docker image:
docker build -t $USER/tsp-web .
- Create a container from this image:
docker run --name my-tsp-web -p "3000:3000" -d $USER/tsp-web:latest
- Execute some tsp commands in your container:
docker exec -d my-tsp-web /bin/bash -c "tsp -L OK ls && tsp -L NOK foobar && tsp -L WAIT sleep 30"
- have a look at the web interface:
firefox "$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' my-tsp-web):3000"
Oneliner: docker rm -f my-tsp-web && docker build -t $USER/tsp-web . && docker run --name my-tsp-web -p "3000:3000" -d $USER/tsp-web:latest && docker exec -d my-tsp-web /bin/bash -c "tsp -L OK ls && tsp -L NOK foobar && tsp -L WAIT sleep 30" && firefox "localhost:3000"
Environment
| Environment | Description | Example | Default |
|:---------------|:------------------------------------|:----------------------------------------|:----------|
| TSP_WEB_BIN
| The binary name of TSP | tsp
(for Linux) ts
(for Mac) | tsp
|
| TSP_WEB_PORT
| The port number to run TSP-Web on | 8080
| 3000
|
| TSP_WEB_HOSTNAME
| The hostnamre to run TSP-Web on | 192.168.0.20
| 0.0.0.0
|