From 2d2417b9d1c3d441a5573fbc85fdb734aa24d4e3 Mon Sep 17 00:00:00 2001 From: dvelo <52332868+DeveloLongScript@users.noreply.github.com> Date: Fri, 27 Dec 2024 12:59:44 -0600 Subject: [PATCH] chore: make contributing more clear --- CONTRIBUTING.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9a00da6..ec6bc86 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -46,8 +46,14 @@ MONGO_DB="mongodb+srv://..." ## Smaller things (for production-ready servers) ### Cron +The Cron tasks used in MHSF are used to gather statistics on both online servers and Minehut as a whole. It works internally by pinging the `/servers` endpoint every 30 minutes from Minehut and pulling the data into the MongoDB database. + Cron can run in either a docker container or just be run in the background. To run it through Docker, use the following: ```bash +# Clone Cron tasks +git clone https://github.com/DeveloLongScript/MHSF +cd cron + # Install dependencies and build script on your local machine yarn yarn run build @@ -56,11 +62,15 @@ docker build . ``` To run it without Docker, use the following: ```bash +# Clone Cron tasks +git clone https://github.com/DeveloLongScript/MHSF +cd cron + yarn run build ``` > [!NOTE] -> You must have a `.env.local` with a MongoDB database (same `MONGO_DB` key) in the previous directory (for monorepo like management) running without Docker, and +> You must have a `.env.local` with a MongoDB database (same `MONGO_DB` key) **in the previous directory** (for monorepo-like management) running without Docker, and > the same `.env.local` *but in the same directory when* using Docker. ### Reporting