Introducing DiscordBot, a robust project meticulously crafted to revolutionize the way you remotely manage a plethora of services. At its core, DiscordBot is optimized to deliver unparalleled control over game servers, prominently featuring beloved titles such as Minecraft and FiveM.
Catering to both administrators and players alike, DiscordBot redefines the landscape of overseeing game servers by endowing you with effortless and comprehensive remote management capabilities. What truly sets DiscordBot apart is its remarkable adaptability, allowing users to seamlessly transition between diverse game servers without necessitating intervention from administrators.
Unlock a new realm of game server management possibilities with DiscordBot - where control meets convenience.
To run the project you need to have node 18 or higher installed on your dev/dist machine.
- Installation: Begin by downloading the DiscordBot project:
git clone https://github.com/stefanpost268/DiscordBot.git
- Environment Setup: Navigate to the project folder and configure your environment variables:
cd ./discordbot
cp .env.example .env
- Development Mode: Launch the development server with Node.js:
npm install
npm run dev
The distribution version of the DiscordBot project is aimed at being uses on the linux platform. Follow these steps to set up and distribute the project.
Before creating a distribution version, ensure that the settings are correctly configured in development mode.
Run the following command to build the application:
npm run build
Navigate to the dist directory and install the necessary node packages:
cd ./dist
npm install
After installing the node packages, you can run the application using the following command:
node index.js
Docker images for this project are automatically built and published via GitHub Actions whenever changes are pushed to the repository. The workflow applies a versioning and tagging strategy to help you identify and use the correct image:
- Versioned Tags: Each release is tagged with a version number (e.g.,
ghcr.io/discordbot:1.2.3
). - Branch Tags:
- The
main
branch also publishes alatest
tag (e.g.,ghcr.io/discordbot:latest
). - The
dev
branch publishes adev-latest
tag (e.g.,ghcr.io/discordbot:dev-latest
).
- The
- For stable releases:
docker pull ghcr.io/discordbot:<version> # or always get the latest stable docker pull ghcr.io/discordbot:latest
- For development builds:
docker pull ghcr.io/discordbot:dev-latest
Replace
<version>
with the desired version number.
The following is an example to set up the DiscordBot in a Docker container.
services:
discordbot:
image: ghcr.io/stefanpost268/discordbot:latest
container_name: discordbot
working_dir: /usr/src/app
command: node dist/index.js
environment:
- NODE_ENV=production
env_file:
- ./.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock # Mount Docker socket
- ./config:/usr/src/app/config # Mount config folder
The CI workflow determines which tags to apply based on the branch:
- On
main
: tags as both the version andlatest
. - On
dev
: tags as both the version anddev-latest
. - On other branches: only the version tag is applied.
The project uses Semantic Versioning for Docker images:
- Major (
X.0.0
): Breaking changes or significant new features. Example:ghcr.io/discordbot:2.0.0
- Expect: Major new features, possible breaking changes, or significant refactors.
- Minor (
X.Y.0
): Backwards-compatible feature additions or improvements. Example:ghcr.io/discordbot:1.3.0
- Expect: New features, enhancements, or improvements that do not break existing usage.
- Patch (
X.Y.Z
): Backwards-compatible bug fixes or small updates. Example:ghcr.io/discordbot:1.3.2
- Expect: Bug fixes, security patches, or minor tweaks.
- Development (
dev-latest
): Latest development build from thedev
branch. Example:ghcr.io/discordbot:dev-latest
- Expect: Experimental features, work-in-progress changes, or unstable builds not intended for production.