Docker Compose

Deploy YokeBot with Docker Compose for production environments.

Overview

Docker Compose is the recommended way to deploy YokeBot in production. The included docker-compose.yml file sets up the engine, dashboard, and an optional Postgres database.

Prerequisites

  • Docker Engine 24+ installed
  • Docker Compose v2 installed
  • At least 2 GB of free RAM

Quick Start

git clone https://github.com/yokebots/yokebot.git
cd yokebot
cp .env.example .env
# Edit .env — set POSTGRES_PASSWORD and add your API keys

docker compose up -d

This starts three services:

  • engine — the API server on port 3001.
  • dashboard — the web UI on port 3000.
  • postgres — a Postgres 17 + pgvector instance (internal only, not exposed to host).

Configuration

Docker Compose reads configuration from your .env file. Copy the example and set a secure Postgres password:

cp .env.example .env
# Edit .env — at minimum, set POSTGRES_PASSWORD to a secure random value

The DATABASE_URL is configured automatically by docker-compose.yml using your POSTGRES_PASSWORD. Key variables for Docker deployment:

# Postgres password (REQUIRED — docker-compose will fail without this)
POSTGRES_PASSWORD=your_secure_random_password

# LLM providers (at least one required)
DEEPINFRA_API_KEY=your-key
# OPENROUTER_API_KEY=your-key

# Media generation (optional)
# FAL_API_KEY=your-key

# Supabase (optional — only needed for multi-user auth)
# SUPABASE_URL=https://your-project.supabase.co
# SUPABASE_ANON_KEY=your_anon_key
# SUPABASE_JWT_SECRET=your_jwt_secret

Updating

git pull origin main
docker compose build
docker compose up -d
lightbulb
Docker Compose handles zero-downtime restarts. The new containers start before the old ones are stopped.

Using SQLite with Docker

If you prefer SQLite over Postgres, remove or comment out the yokebot-db service in docker-compose.yml and remove the DATABASE_URL variable. Mount a persistent volume for the SQLite file:

volumes:
  - ./data:/app/packages/engine/data

Logs and Monitoring

View logs for all services:

docker compose logs -f          # all services
docker compose logs -f engine    # engine only
docker compose logs -f dashboard # dashboard only

Scaling

For most deployments, a single instance of each service is sufficient. If you need to scale the engine for large agent counts, use Postgres as the database (required for multi-instance) and run multiple engine containers behind a load balancer.