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.jsonfile - The
LocusPocusBot/bin/Debug/net6.0directory contains theappsettings.jsonfile
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.jsonfile - The
LocusPocusBotdirectory contains theappsettings.jsonfile
Run with the dotnet CLI by executing:
cd LocusPocusBot
dotnet runA 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.jsonThis 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 --buildA 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