Skip to main content

Deployment

Local Development (Docker Compose)

All services run locally via Docker Compose. The dev.py script wraps common operations.

Services

ServiceTechnologyPortPurpose
frontendSvelteKit dev server5173UI application
apiFastAPI + uvicorn8000Backend API
workerPython workerBackground jobs
dbPostgreSQL 16 + pgvector5432Primary database
redisRedis6379Job queue broker
supabase-authGoTrue9999Auth service
inbucketInbucket SMTP9000Email capture (dev only)

inbucket is a local email capture tool. It intercepts all outbound email from GoTrue (password reset links, confirmations) so that no real email is sent during development. Access the inbox at http://localhost:9000.

Dev Commands

python scripts/dev.py up        # Start all services
python scripts/dev.py down # Stop all services
python scripts/dev.py clean # Remove volumes (resets all data)
python scripts/dev.py logs # View logs for all services

To view logs for a specific service:

python scripts/dev.py logs api
python scripts/dev.py logs worker

Production Topology

Orbit Classroom is designed for small-to-medium deployments. The v1 scale target is approximately 100 total users with a single active model.

ComponentRecommended Option
FrontendSvelteKit static build on CDN or container
BackendFastAPI + uvicorn in a container
WorkerPython worker in a separate container
DatabaseManaged PostgreSQL (Supabase, AWS RDS, or equivalent)
StorageManaged S3-compatible (Supabase Storage, AWS S3, or equivalent)
CacheManaged Redis or containerized Redis
AuthSupabase Cloud or self-hosted GoTrue

A single application host plus managed database is acceptable at the v1 scale target. The frontend, API, and worker can run on the same host if needed.


Environment Variables

The .env file at the project root configures all services. Generate secrets with:

python scripts/dev.py secrets

Key Variables

VariableDescription
POSTGRES_PASSWORDDatabase password
SUPABASE_JWT_SECRETAuth secret — must be 32+ characters
ADMIN_EMAILEmail address for the first Admin account
ADMIN_PASSWORDPassword for the first Admin account
PUBLIC_API_BASE_URLURL the frontend uses to reach the backend API
ANTHROPIC_API_KEYOptional — required only if using Anthropic models
OPENAI_API_KEYOptional — required only if using OpenAI models
OLLAMA_BASE_URLOllama endpoint (default: http://host.docker.internal:11434)
warning

Never commit .env to version control. The file contains secrets that grant access to the database, auth service, and external model providers.