Skip to content
This repository has been archived by the owner on Jul 19, 2020. It is now read-only.

This project has been deprecated & archived, new and improved version: ModdedMinecraftClub/Mmcc.Stats

License

Notifications You must be signed in to change notification settings

ModdedMinecraftClub/poller-legacy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poller

This project has been deprecated & archived, new and improved version: ModdedMinecraftClub/Mmcc.Stats.

Player count statistics tool for Minecraft server networks - tracking and displaying which servers are played.

Available at https://poller.moddedminecraft.club/.

Data Collector License lang Framework Actions Status
Web App License lang - -

screenshot

Acknowledgement

This project would not possible without TraceLD/minestat-sharp which is a fork of FragLand/minestat created by TraceLD - a member of MMCC Staff Team and co-author of poller. The modifications in TraceLD/minestat-sharp compared to FragLand/minestat include changing the structure to a C# Class Library packaged as a NuGet package instead of a single C# Class packaged as a standalone file, removal of obsolete code and minor refactorings.

Deployment

1. Installing dependencies

Before moving on to deploy the poller you will need to install the following dependencies:

  1. MySQL >=8.0 or MariaDB equivalent

  2. Python >=3.7

  3. .NET Core >=3.0

Further steps will assume that you have the dependencies already installed.

2. Preparing the database

Both the Data Collector and the Web App require a MySQL >=8.0 or MariaDB equivalent database to operate. Follow the steps below to prepare one.

  1. Run the ./prepare_database.sql script to create the MySQL/MariaDB database and tables.

  2. Populate the server table with servers you want the poller to poll. In the enabled column 0 means false and 1 true.

3. Building the Data Collector

This step can be skipped by downloading the latest pre-compiled binaries from here.

To build the data collector run the prepared ./src/data_collector/buildLinux.sh or ./src/data_collector/buildWindows.ps1 script (depending on your OS).

4. Deploying the Data Collector

  1. If you've built the data collector yourself go to ./src/data_collector/Build, otherwise go to the folder to which you've unzipped the binaries that you've downloaded from the Releases page.

  2. Run the dotnet ModdedMinecraftClub.Poller.App.dll <Server> <Port> <Username> <Password> command (replace each command line argument (Server, Port, Username, Password) with your own data).

5. Deploying the Web App

// TODO - Universal deployment process

The deployment process described below has been put together with MMCC in mind and is Linux only, so it may not apply to your server.

  1. Install the following packages:

    1. uwsgi

    2. uwsgi-plugin-python3

    3. python3-pip

    4. python3-venv

  2. Make a new poller-web user/group, clone the source folder in ~, then in ./src/web, where . is root folder of this repo run:

    1. python3 -m venv venv

    2. source venv/bin/activate

    3. pip3 install -r requirements.txt

  3. Create /usr/lib/systemd/system/poller-web.service:

[Unit]
Description=MMCC poller webapp

[Service]
Type=simple
User=<user>
Group=<group>
ExecStart=/usr/bin/uwsgi --ini /path/to/poller-web.ini

[Install]
WantedBy=default.target
  1. Run sudo systemctl enable --now poller-web

  2. You should now see the socket in the directory with the ini file. Then use the following nginx location config:

location / {
    include uwsgi_params;
    uwsgi_pass unix:/path/to/poller-web.sock;
}

About

This project has been deprecated & archived, new and improved version: ModdedMinecraftClub/Mmcc.Stats

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •