Setup

Requirements

  • Docker Desktop on Windows or macOS, or Docker Engine on Linux.
  • A config.env file in the project root. See Configuration.
  • A Cloudflare tunnel credentials file and a config.yml in ~/.cloudflared on the Docker host, if you want a public dashboard. See Deploy.

Start the bot

  1. Confirm config.env exists and holds the values you want.

  2. Run the setup script for your platform.

    On Windows:

    docker-setup-preconfig.bat

    On Linux or macOS:

    chmod +x docker-setup-preconfig.sh
    ./docker-setup-preconfig.sh
  3. Check the logs to confirm the bot connected:

    docker-compose logs -f fantasy-bot

The startup message appears in the Discord channel that owns the webhook.

Manage the bot

Stop the containers:

docker-compose down

Restart the bot after a config change:

docker-compose restart fantasy-bot

Rebuild after a code change:

docker-compose up -d --build

Show container status:

docker-compose ps

Development tools

Both scripts in dev/ run inside the container and read credentials from the environment.

Check that the ESPN API is reachable and preview the available data:

docker-compose exec fantasy-bot python dev/api_healthcheck.py

The script exits non-zero on failure, so you can run it from a cron check.

Backfill a completed season into the dashboard database:

docker-compose exec fantasy-bot python dev/backfill_season.py 2025

The year is a command-line argument because LEAGUE_YEAR stays pinned to the current season.