elypia / docker-alexis-discord

I'm a multi-purpose chatbot for Discord that provides utilities and integrations with services! [This is a mirror from GitLab, please interact with the repository there.]

Home Page:https://gitlab.com/Elypia/docker-alexis-discord

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alexis (Discord) for Docker Matrix Discord Docker Build Donate

Docker Images

About Alexis

I'm a Discord chatbot that provides ample functionality for Discord guilds through utilities and integrations with third-party services and games.

This repository puts me in a little container, so I can easily be sent around and ran on any system. If you want to see my chatbot code then you'll want to the Alexis repository!

Getting Started

It's strongly recommended specifying a version number, don't use latest; I can get updates frequently can and have breaking changes or new configurations.

The Discord bot token, represented by the discord.bot-token environment variable is always required to run.

I support two databases, MySQL, and H2.
If you're just testing, or after the simplest configuration possible, then you can use the embedded H2 database which is bundled in the image.

It's strongly recommended specifying the following environment variables for any production setup to configure the image to use MySQL instead of H2.

  • application.persistence.url
  • application.persistence.username
  • application.persistence.password
  • application.persistence.dialect
  • application.persistence.driver

Docker Compose

It's recommended to use Docker Compose if available to have a cleaner configuration and to make it more expensive, such as if you want to run your MySQL database through the docker-compose.yml as well.

A bare minimum configuration can be set up like the following.

version: "3.8"
services:
  alexis:
    image: elypia/alexis-discord:x.y.z
    volumes:
      - "./persistence:/home/alexis/persistence"
    environment:
      discord.bot-token: "YOUR DISCORD BOT TOKEN"

Docker

To use the embedded database, just run me normally and specify a volume where the persistent data can get stored.

docker run -t                                 \
  -e "discord.bot-token={BOT_TOKEN}"          \
  -v "./persistence:/home/alexis/persistence" \
  elypia/alexis-discord:x.y.z

Docker Environment Variables

The Docker image can be configured though environment variables, the following will run through all available environment variables that can influence runtime.

discord.bot-token

This is the only required configuration and specifies the Discord bot token to use when authenticating your bot. If you don't have a bot token, you should visit the Discord Developer Portal to create and application to generate a bot token you can use.
You can find out more by reading the Discord Developer Documentation.

application.persistence.url

This is the URL to connect to a custom MySQL instance, this is not required but is strongly recommended for a production setup.

application.persistence.username

The username for the user that should connect to the database, this is required if a custom database connection will be used.

application.persistence.password

The password for the user that should connect to the database, this is required if a custom database connection will be used.

application.persistence.dialect

The dialect that should be used when connecting to the database. This should typically be one of the following depending on if you're using MySQL 5.7, or MySQL 8.

  • org.hibernate.dialect.MySQL57Dialect
  • org.hibernate.dialect.MySQL8Dialect

application.persistence.driver

This must be set to com.mysql.cj.jdbc.Driver, if connecting to a MySQL instance.

application.api.steam

The optional Steam API key which can be obtained from the Steam API. This enables the Steam module which provides all Steam commands. The module will be disabled if this is not specified.
If you don't have one, you can login and find out how to obtain one from the Steam Web API Documentation page.

application.api.osu

Your osu! API key to enable the osu! module.
You can visit the osu!api wiki for information on how to get an API key.

application.api.cleverbot

Your Cleverbot API key if you want to enable the Cleverbot module.
You can get an API key from the official Cleverbot API website.

This is a paid API, there is no way to have this module enabled without spending money.

application.api.twitch.client-id

Your Twitch client ID to enable the Twitch module. This is required to enable the Twitch module and any Twitch related functionality such as live stream notifications. You can create an application and get Twitch API credentials from the Twitch Developers site.

application.api.twitch.client-secret

Your Twitch client secret, required if the Twitch module is enabled. If you specify a Twitch client ID, this is required, otherwise the bot will throw an error and ask you to address this problem.

GOOGLE_APPLICATION_CREDENTIALS

The path to the file with your Google Cloud Platform service account credentials. This is optional for the image, but is required to enable the YouTube and Translation modules.

You can visit the Google Cloud website for more information on how to register, create an application, and register a service account.

Google Translate is a paid API, it has a free tier which is appropriate for most small use-cases but can incur costs with significant usage, if enabled, keep this in mind.

GOOGLE_CLOUD_LOGGING

If GOOGLE_APPLICATION_CREDENTIALS is specified, this can be set to true to enable logging to Google Cloud Logging, this is helping for reviewing the usage of the application and persisting logs.

Open-Source

This project is open-source under the Apache 2.0!
While not legal advice, you can find a TL;DR that sums up what you're allowed and not allowed to do along with any requirements if you want to use or derive work from this source code!

About

I'm a multi-purpose chatbot for Discord that provides utilities and integrations with services! [This is a mirror from GitLab, please interact with the repository there.]

https://gitlab.com/Elypia/docker-alexis-discord

License:Apache License 2.0


Languages

Language:Dockerfile 100.0%