Installation - niekcandaele/CSGO-RankMe-stats GitHub Wiki
You want this bot to be online 24/7 so I highly suggest you install this on a server. While you can install it on your local computer, that means the bot will go offline whenever your PC is shut down.
No idea how to even get started? Are you scared of the command line? Would you rather I host the application for you? I am considering turning this into a SaaS product, you can fill out this form to subscribe to updates.
In this guide, I will assume you are installing this on a Linux server running Ubuntu. The bot will work on other distros or Windows, installation steps will be very similar.
If you do not have a server yet, you can use one of these referral links to get some free credit and support the project :).
Docker
docker run --env-file ~/.env catalysm/csgo-rankme:latest
You can now access the application by browsing to http://ip-address:8080
Expanded example:
docker run -d --restart on-failure:5 --memory="1g" --name rankme-stats -p 8081:8080 --env-file ~/.env catalysm/csgo-rankme:latest
Manual install
Installing Node.js
You can download Node.js from their website. To run this bot you will need atleast version V8.x.
sudo apt-get update
sudo apt-get install curl python-software-properties
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install nodejs
Now you should check the installed versions of node and npm (the node package manager)
node -v
npm -v
Installing the application
Download the latest release from Github.
curl -L https://github.com/niekcandaele/CSGO-RankMe-Discord/archive/vx.x.x.tar.gz | tar zx
(Check the version number you are downloading in this command)
This command has downloaded the files and extracted them into a new folder, let's enter that folder
cd CSGO-RankMe-Discord-vx.x.x/
Now, we must install the dependencies. This command may take a minute, do not cancel it.
npm install --only=prod
Configuring the application
Running the application
Let's try running the bot now!
node src/index.js
If everything went well, you will see no errors and the bot will come online.
Auto start after a system reboot & daemonizing
There are many ways to do this. I will show you an example with PM2
Install pm2:
npm i -g pm2
Start the bot with pm2:
pm2 start src/index.js
Now the bot is running in the background. To make sure it will restart after a reboot:
pm2 startup
Follow the instructions it gives. This will be different depending on what distro you are using.