# 2b2t A 2b2t queue tracker. ## Setup The queue tracker can be setup using docker compose. 1. Add this to your docker compose: ```yaml 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": {} ``` 2. Create the database file: ```sh touch ./data.sqlite ``` 2. Start the containers: ```sh docker compose up -d ``` 3. Insert the worker tokens into your master's database: ```sh 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