Skip to content

UT2004-Coding-Projects/Hv-PugBot

Repository files navigation

Pubobot

Development Setup

Install poetry for your system.

Create a config.cfg file and add the following:

DISCORD_TOKEN = "your_discord_token"

For more options, see config.cfg.example.

Install dependencies and execute with poetry:

$ poetry install
$ poetry run pubobot

Deploying

Build

$ docker build -t pubobot .

Docker

For persistence, mount volumes /pubobot/data and /pubobot/logs.

$ docker run -d \
    -e PUBOBOT_DISCORD_TOKEN="...your bot token.." \
    -v pubobot-data:/pubobot/data \
    -v pubobot-logs:/pubobot/logs \
    pubobot

Alternatively, you can a config file matching config.cfg.example and mount to /pubobot/config/config.cfg.

$ docker run -d \
    -v path/to/config.cfg:/pubobot/config/config.cfg \
    -v pubobot-data:/pubobot/data \
    -v pubobot-logs:/pubobot/logs \
    pubobot

Docker Compose

A compose.yaml file is provided for your convenience. You will need to create a .env file and set your discord token:

.env

PUBOBOT_DISCORD_TOKEN=..bot token..

Bring up

$ docker-compose up