A dashboard for people who run multiple ArchiveTeam Warriors (like me) https://atw.do.kdy.ch/
 
 
 
 
Go to file
Kody d47dec1484
Build / Build (push) Successful in 13m9s Details
Merge pull request 'Update Node.js to v20.7' (#10) from renovate/all-minor-patch into main
Reviewed-on: #10
2023-09-20 06:55:51 +00:00
.forgejo/workflows Rename build action 2023-09-05 18:06:18 +02:00
.vscode Move things around and start vite project 2023-08-25 22:40:33 +02:00
backend Update dependency ws to v8.14.2 2023-09-19 15:34:08 +00:00
frontend Code formating and minor rewording 2023-09-08 22:09:51 +02:00
.dockerignore Make a MUCH lighter container image 2023-09-05 14:31:34 +02:00
.gitignore Add Docker container 2023-08-28 16:36:20 +02:00
Dockerfile Update Node.js to v20.7 2023-09-20 00:48:08 +00:00
LICENSE Update README.md and add LICENSE 2023-08-31 10:22:20 +02:00
README.md Code formating and minor rewording 2023-09-08 22:09:51 +02:00
docker-compose.yml Update docker-compose.yml 2023-08-28 17:24:36 +02:00
renovate.json Add renovate.json 2023-08-28 16:49:55 +02:00

README.md

ATW Watcher

A dashboard for people who run multiple ArchiveTeam Warriors (like me)

Environement variables

  • PORT: Overwrite the port the server will listen on.
  • LOG_LEVEL: Set the level for logs (defaults to informative and above).
    • error: Only errors
    • warn: Warnings and errors
    • debug: Shows all, including debugging
    • Else: Infos, warnings and errors

Run with Docker

There's a docker-compose.yml for ease of use.

# For use with docker compose
# (Edit the first part of "ports" to change the exposed port)
wget -O docker-compose.yml https://git.rita.moe/kody/atw-watcher/raw/branch/main/docker-compose.yml

# Config file
wget -O config.json https://git.rita.moe/kody/atw-watcher/raw/branch/main/backend/config.json.dist

# Set the nickname you use in the leaderboard, and add as many servers as you need
# You probably don't need to change the port used for the app inside the container
# See below for details about the config.json file
$EDITOR config.json

# Now choose between with or without compose
# - With docker compose
docker compose up -d

# - With docker CLI
# (Change the first part of "-p" to set the exposed port)
docker run -d -it \
  --name atw-watcher -p 3100:3100 \
  --mount type=bind,source="$(pwd)"/config.json,target=/app/backend/config.json,readonly \
  git.rita.moe/kody/atw-watcher:latest

# Open your browser at localhost:3100
# (or the IP of the machine and the exposed port you picked)

Build and run

Config

cd backend

# Copy the example config file
cp config.json.dist config.json

# Edit the config ile
$EDITOR config.json
  • user: (optional, str) The nickname set in your warrior, to fetch your stats
  • port: (optional, int) The port the backend will listen to
  • servers[]:
    • name: (optional, str) A unique name to recognize your Warrior (uses host by default)
    • tls: (optional, bool) If you have your Warrior accessible through TLS (HTTPS/WSS)
    • allowUnsecure: (optional, bool) If using TLS, allow some errors (like self-signed certs)
    • host: (required, str): The host of your Warrior frontend
    • port: (required, int): The port of your Warrior frontend
    • path: (optional, str): Path to your Warrior frontend if not at the root
    • user: (required, str): The username for your Warrior basic authentication
    • pass: (required, str): The password for your Warrior basic authentication

If you have multiple Warriors under a same host make sure to set a unique name for each of them!

If your Warrior is behind an HTTPS reverse proxy (like https://warrior.example.com), set "tls": true and "port": 443.
If it's under a subpath (like https://example.com/warrior), set the path with a leading slash: "path": "/warrior".

Build frontend

cd frontend

# Install deps
yarn install --pure-lockfile

# If you want to force the WebSocket URL (ie. for dev) create a .env
# echo 'VITE_WS_URL="wss://atw.do.kdy.ch"' > .env

# Build a static version to the `dist/` folder
yarn build

Run backend (and serve front)

cd backend

# Install deps
yarn install --pure-lockfile

# Start the server
yarn start

License

MIT License
Copyright (c) 2023 André "Kody" Fernandes