Skip to content

Latest commit

 

History

History
69 lines (50 loc) · 2.12 KB

File metadata and controls

69 lines (50 loc) · 2.12 KB

Fishie setup

This repository keeps the bot source in src, database migrations in migrations, and the Docker setup in the repository root.

Copy examples/config.toml to config.toml and fill in the values you plan to use.

Most third-party keys are optional until you use their related commands:

Create .env from .env.example.

Run with Docker

The regular Compose file starts PostgreSQL, applies migrations, and then starts Fishie:

docker compose up -d --build
docker compose ps
docker compose logs -f fishie

Restart the bot with:

docker compose restart fishie

Stop everything with:

docker compose down

The production Compose file expects an existing PostgreSQL server and the credential key file used on the host. Set FISHIE_UID and FISHIE_GID to the account that owns the project files, apply migrations, then start it:

sudo docker compose -f compose.production.yaml run --rm --no-deps fishie python manage.py migrate
sudo docker compose -f compose.production.yaml up -d --build fishie

The bot and API share one process. The API listens on port 8001 by default and /health/ready reports whether Discord and PostgreSQL are ready.

Run without Docker

Create a virtual environment, install the locked requirements, apply the migrations, and launch from src:

python3.13 -m venv venv
venv/bin/python -m pip install -r requirements.txt
cd src
../venv/bin/python manage.py migrate
../venv/bin/python launcher.py

FFmpeg, Chromium dependencies for Playwright, PostgreSQL, config.toml, and the credential key must already be available when running this way.