Skip to content

QuakeJS Stats Tracker is a real-time match tracking system for QuakeJS, designed to collect and store player statistics

License

Notifications You must be signed in to change notification settings

wwwlde/quakejs-stats

Repository files navigation

QuakeJS Stats Tracker

QuakeJS Stats Tracker Dashboard

๐Ÿ“Œ Overview

This project provides a QuakeJS server with a stats tracking system using Docker and Traefik as a reverse proxy.
It includes:
โœ… QuakeJS Server for hosting matches.
โœ… Stats Tracker to monitor and log player scores.
โœ… Traefik Proxy to handle routing and expose the services.

๐Ÿ“‚ Project Structure

๐Ÿ“ quakejs-stats
โ”œโ”€โ”€ LICENSE                  # License file for the project
โ”œโ”€โ”€ README.md                # Documentation on how to set up and use the project
โ”œโ”€โ”€ ๐Ÿ“ build                 # Contains build-related files for the project
โ”‚   โ”œโ”€โ”€ Dockerfile           # Dockerfile for building the quakejs-stats service
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ code              # Python application and monitoring scripts
โ”‚   โ”‚   โ”œโ”€โ”€ app.py           # Main Flask application (if applicable)
โ”‚   โ”‚   โ”œโ”€โ”€ monitor.py       # QuakeJS match monitoring and stats tracking script
โ”‚   โ”‚   โ””โ”€โ”€ ๐Ÿ“ templates     # HTML templates for the web interface
โ”‚   โ”‚       โ””โ”€โ”€ index.html   # Example index page for web interface
โ”‚   โ”œโ”€โ”€ requirements.txt     # Python dependencies for the stats tracker
โ”‚   โ””โ”€โ”€ supervisord.conf     # Supervisor configuration for managing processes
โ”œโ”€โ”€ ๐Ÿ“ data                  # Persistent storage for the application
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ db                # SQLite database storage for match statistics
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ dynamic           # Dynamic configuration files for Traefik
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ logs              # Log files directory for services
โ”‚   โ””โ”€โ”€ server.cfg           # Configuration file for the QuakeJS server
โ””โ”€โ”€ docker-compose.yaml      # Docker Compose configuration to run all services

๐Ÿš€ Getting Started

1๏ธโƒฃ Prerequisites

Before running the project, make sure you have:
๐Ÿ”น Docker installed: Install Docker
๐Ÿ”น Docker Compose installed: Install Docker Compose


2๏ธโƒฃ Clone the Repository

git clone https://github.com/yourusername/quakejs-server.git
cd quakejs-server

3๏ธโƒฃ Set Up the Environment

Create a .env file to override default settings if needed:

SERVER_IP=quakejs-proxy
SERVER_PORT=27960
RCON_PASSWORD=5tr0nG_P@ssw0rd!
TRACKED_PLAYERS=Visor,Sarge,Major
MATCH_TIMEOUT=3600
DB_PATH=/app/db/quake_stats.db
RUNNING=True

4๏ธโƒฃ Create Required Directories

Ensure necessary directories exist for persistent data:

mkdir -p data/db
chmod -R 777 data/db

5๏ธโƒฃ Build & Start the Services

Run the following command to build and start the containers:

docker compose up --build -d

๐Ÿ”น --build ensures the images are rebuilt.
๐Ÿ”น -d runs the containers in detached mode (background).

Check running containers:

docker compose ps

๐Ÿ–ฅ๏ธ Access the Services

Service URL or Command
QuakeJS Game Server quakejs.example.com (or IP)
Stats Tracker API http://quakejs-stats.example.com
Traefik Dashboard http://traefik-dashboard.example.com

๐Ÿ“Š Monitoring & Logs

Check Logs for a Service

docker logs -f quakejs-stats

Restart a Service

docker compose restart quakejs-stats

Stop All Services

docker compose down

โš™๏ธ Configuration

Modify docker-compose.yaml if needed:

  • Modify environment variables for different settings.

Example: Change tracked players in quakejs-stats:

environment:
  - TRACKED_PLAYERS=player1,player2,player3

๐Ÿ› Troubleshooting

Issue Solution
sqlite3.OperationalError: unable to open database file Ensure data/db exists and has write permissions (chmod -R 777 data/db).
QuakeJS not accessible Check firewall settings and ensure ports are correctly exposed.
Logs not showing Run docker logs -f quakejs-stats to debug.

๐Ÿ“œ License

This project is open-source under the MIT License.


๐Ÿ“Œ Conclusion

You're now ready to run and track QuakeJS matches using this system! ๐ŸŽฎ๐Ÿš€
If you encounter any issues, feel free to open an issue or contribute.

About

QuakeJS Stats Tracker is a real-time match tracking system for QuakeJS, designed to collect and store player statistics

Topics

Resources

License

Stars

Watchers

Forks

Packages