Skip to content

Xithrius/Xythrion

Repository files navigation

Xythrion

A graphing bot built with discord.py.

MIT CI pre-commit.ci status codecov

Installation

Requirements

Docker installation

Local installation

Bringing up of infra.xithrius.cloud

  1. Cloning
git clone https://github.com/Xithrius/infra.xithrius.cloud
  1. Environment variables
cp .env.sample .env

Put a password into POSTGRES_PASSWORD and "infra" into POSTGRES_USER

Important

If you're setting up for production, you can place a discord webhook into WATCHTOWER_NOTIFICATION_URL if you plan to use watchtower.

  1. Creating the Postgres container
cd infra.xithrius.cloud/scripts
./create-networks.sh
./setup-postgres.sh infra xythrion xythrion xythrion

Bringing up of this repo

  1. Copy the .env.sample file to .env
cp .env.sample .env
  1. Place your key in XYTHRION_BOT_TOKEN in the .env file, and whatever prefix you'd like (such as ";") into XYTHRION_BOT_PREFIX

Local Installation

  1. (For development) Install pre-commit hooks using pdm precommit
  2. (first time installation) run pdm upgrade to run database migrations
  3. Run the API via pdm api
  4. Finally get the bot up by pdm bot

Docker/Podman Installation

  1. Run docker compose up -d
  2. (If in a production environment) run loginctl enable-linger such that detached containers don't exit when you logout
  3. (Optional) run all the Grafana/Prometheus/Tempo/Loki containers from infra.xithrius.cloud to get realtime metrics.