A previous version of this bot was developed in Go and has been available for about a year and a half. The code of that version is now available in another branch.
MongoDB is required for the bot to work. Data about users and groups will be stored in the database.
Configuration of the application is done through the appsettings.json
file read from the current working directory at startup.
Examples for development and production environments are available.
Choose one of the following methods:
Requirements:
- .NET 6.0 SDK is installed
- MongoDB is running on the host and port specified in the
appsettings.json
file - The
LocusPocusBot/bin/Debug/net6.0
directory contains theappsettings.json
file
Run with the nice green button.
Requirements:
- .NET 6.0 SDK is installed
- MongoDB is running on the host and port specified in the
appsettings.json
file - The
LocusPocusBot
directory contains theappsettings.json
file
Run with the dotnet CLI by executing:
cd LocusPocusBot
dotnet run
A basic development Docker Compose file (not including MongoDB) would look like this:
version: '3'
services:
locuspocusbot:
container_name: 'locuspocusbot'
build: .
network_mode: 'host'
volumes:
- ./LocusPocusBot/appsettings.json:/app/appsettings.json
This time make sure that the configuration file lies at LocusPocusBot/appsettings.json
.
Now run this command in the repository directory:
docker-compose -f docker-compose.yml up --build
A basic Docker Compose file for production looks like this:
version: '3'
services:
locuspocusbot:
container_name: 'locuspocusbot'
image: 'matteocontrini/locuspocusbot'
restart: unless-stopped
network_mode: 'host'
volumes:
- ./appsettings.json:/app/appsettings.json