HiveMind runs on a number of different Docker containers, both in production and on local dev systems. The system is intended to make local dev systems run similarly to production without requiring extensive setup.
The public-facing containers. In production, these run on the app
servers. See Websocket Documentation for more info on what data each websocket server provides.
web
- nginx web server. Routes requests to containers, and serves some static files.nextjs
- frontend web application (React/NextJS)app
- backend API server (Python/Django)stats_listener_v3
- websocket server to handle connections from stats clients (Node)stats_listener_v4
- temporary use to test client features (Node)gamestate
ingame_stats
signin
event_relay
tournament_relay
whiteboard_relay
Background services. In production, these run on the worker
server.
web
- in production only, runs the webserver at https://worker.kqhivemind.comworker
- handles the execution of any background process such as API calls to external services, postgame processing, and achievements (Python/Django/Celery)scheduler
- schedules periodic tasks to run on the worker (Python/Django/Celery)event_manager
- mostly obsolete - listens to gamestate
feed and triggers postgame processing to be run by the worker (Python)kquity
- handles game prediction based on Rob Renaud's KQuityflower
- web application to provide monitoring of the worker process (Python/Celery/Flower)Runs Graylog for log handling. In production, these run on the logs
server.
web
- in production only, runs the webserver at https://logs.kqhivemind.comelasticsearch
- ElasticSearch container for Graylogmongo
- MongoDB container for Grayloggraylog
- Graylog applicationThe database and Redis servers. These containers are only used for local or dev environments. In production, these run directly on the db
server, without Docker containers.
db
- the primary database (PostgreSQL)redis
- cache, data channels, and task queue (Redis)