Skip to content

Lordrenki/IdleRPG_Remastered

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3,101 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IdleRPG

CI Dockerhub okapi teatro

This is the code for the IdleRPG Discord Bot.

You may submit an issue or open a pull request at any time.

License

The IdleRPG Project is licensed under the terms of the GNU Affero General Public License 3.0 ("AGPL"). It is a GPLv3 with extra clause for use over networks (see section 13).

AGPL for humans.

Running it

Quick start with Docker Compose

  1. Copy the example environment file:

    cp .env.example .env
  2. Generate config.toml with the interactive helper. It walks through the required Discord and database credentials and writes a validated configuration file for you:

    python scripts/configure.py

    You can re-run the helper at any time to update secrets or optional integrations.

  3. Edit .env to include your Discord bot token and any database credentials the compose stack should provision for you. Every field in the [database] block of the generated config.toml accepts environment variables, so you can keep the file under version control and inject secrets at runtime if preferred.

  4. Launch the stack:

    docker compose up --build

By default the compose file provisions PostgreSQL and Redis containers and shares credentials with IdleRPG through environment variables. To point IdleRPG at hosted services instead, replace or remove the local POSTGRES_*/REDIS_* entries in .env, set DATABASE_URL or provider-specific variables for a Neon or Supabase instance, and provide a REDIS_URL/UPSTASH_REDIS_URL for providers such as Upstash. Leaving those variables set to the defaults continues to use the local containers.

Initialize the schema

Once PostgreSQL is reachable you can bootstrap the schema with a single helper:

python scripts/init_db.py

Use --config and --schema to target different files if required.

Managed Postgres and Redis options

IdleRPG's configuration loader automatically understands common connection strings:

  • Neon / Supabase — Export DATABASE_URL, POSTGRES_URL, or provider-specific variables (user, password, host, port) and the loader will split them into the fields IdleRPG expects.
  • Upstash Redis — Provide REDIS_URL or UPSTASH_REDIS_URL and the bot will connect over TLS with the correct password and database index.

These environment variables can be placed directly in .env or in your deployment platform's secret manager without altering config.toml.

Interactive configuration for manual deployments

Outside Docker Compose you can still run the helper before starting the launcher:

python scripts/configure.py --config /path/to/config.toml

The script validates connection strings, enforces the presence of required PostgreSQL and Redis credentials, and ensures IdleRPG can authenticate with Discord before you launch the bot.

Legacy Podman workflow

The original Podman scripts remain available for contributors who prefer that toolchain. Development instances will wipe storage when stopped.

git clone https://git.travitia.xyz/Kenvyra/IdleRPG.git
cd IdleRPG
./scripts/beta.sh
podman build -t idlerpg:latest .
podman run --rm -it --name idlerpg --pod idlerpgbeta -v $(pwd)/config.py:/idlerpg/config.py:Z idlerpg:latest

Permanent hosting scripts (./scripts/setup.sh) are still unsupported and may require manual adjustments.

Utility

IdleRPG uses black, flake8 and isort for code style. Please always run ./scripts/format.sh before submitting a pull request and fix any problems.

./scripts/dumpdb.sh db_name will update the database scheme from the postgres container.

About

A fantasy RPG bot for Discord.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 96.8%
  • PLpgSQL 2.1%
  • Other 1.1%