A 2b2t queue tracker.
Find a file
2025-07-04 17:40:16 +02:00
models first commit 2025-06-29 11:20:23 +02:00
routes add new time ranges 2025-07-04 17:40:16 +02:00
static add new time ranges 2025-07-04 17:40:16 +02:00
worker adjust asciiart 2025-06-29 12:42:41 +02:00
.gitignore first commit 2025-06-29 11:20:23 +02:00
Dockerfile first commit 2025-06-29 11:20:23 +02:00
Dockerfile.worker install ca certs in worker docker image 2025-06-29 12:10:35 +02:00
go.mod cleanup 2025-06-29 11:47:50 +02:00
go.sum first commit 2025-06-29 11:20:23 +02:00
LICENSE.md first commit 2025-06-29 11:20:23 +02:00
main.go adjust asciiart 2025-06-29 12:42:41 +02:00
README.md small rework of the web ui 2025-06-29 13:30:52 +02:00

2b2t

A 2b2t queue tracker.

Setup

The queue tracker can be setup using docker compose.

  1. Add this to your docker compose:
services:
  # The master
  "2b2t":
    build:
      context: "https://git.1e99.eu/1e99/2b2t.git"
      dockerfile: "Dockerfile"
    ports:
      - "3000:3000"
    volumes:
      - "./data.sqlite:/data.sqlite"
    environment:
      "MASTER_DATABASE": "/data.sqlite"
      "MASTER_ADDRESS": ":3000"
    networks:
      - "2b2t"

  # The worker which pings 2b2t
  "2b2t_worker":
    build:
      context: "https://git.1e99.eu/1e99/2b2t.git"
      dockerfile: "Dockerfile.worker"
    environment:
      "WORKER_SUBMIT_URL": "http://2b2t:3000/api/player-count"
      "WORKER_TOKEN": "secret_token"
    networks:
      - "2b2t"

networks:
  "2b2t": {}
  1. Create the database file:
touch ./data.sqlite
  1. Start the containers:
docker compose up -d
  1. Insert the worker tokens into your master's database:
sqlite3 ./data.sqlite
sqlite> INSERT INTO worker (name, token) VALUES ("name", "secret_token");
sqlite> .exit

Further improvements

  • Scrape actual queue waiting times
    • Use a bot that rejoins all the time when it completed the queue
    • Reports the time that it actually took to join the server to the master