Getting Started
Prerequisites
- Docker 20.10+
- Docker Compose (optional, for multi-container setups)
Installation
Pull the official Backflow Docker image:
bash
docker pull backflow/backflow:latestConfiguration
1. Create Configuration Directory
bash
mkdir -p backflow-config
cd backflow-config2. Create config.json
Create a config.json file in your configuration directory:
json
{
"supabase": {
"url": "{{env.SUPABASE_URL}}",
"anonKey": "{{env.SUPABASE_ANON_KEY}}"
},
"jwt": {
"secret": "{{env.JWT_SECRET}}"
},
"routes": [
{
"path": "/health",
"method": "get",
"description": "Health check"
}
]
}3. Create Environment File
Create a .env file with your configuration:
bash
# Database (choose one)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_ANON_KEY=your-anon-key
# Authentication
JWT_SECRET=your-secure-secret-key
# Optional: Redis for caching
REDIS_URL=redis://localhost:6379
# Optional: AI features
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...Start Backflow
Using Docker Run
bash
docker run -d \
--name backflow \
-p 3000:3000 \
-v $(pwd)/config.json:/app/config.json \
--env-file .env \
backflow/backflow:latestUsing Docker Compose
Create a docker-compose.yml:
yaml
version: '3.8'
services:
backflow:
image: backflow/backflow:latest
ports:
- "3000:3000"
volumes:
- ./config.json:/app/config.json
- ./workflows:/app/workflows
- ./integrations:/app/integrations
env_file:
- .env
restart: unless-stoppedThen run:
bash
docker compose up -dOpen:
- API Documentation: http://localhost:3000/ui
- OpenAPI Spec: http://localhost:3000/doc
- Health Check: http://localhost:3000/health
Configuration Structure
backflow-config/
├── config.json # Main API configuration
├── .env # Environment variables
├── docker-compose.yml # Docker Compose config (optional)
├── integrations/ # Custom integration configs
└── workflows/ # Workflow definitionsNext Steps
- Quick Start - Build your first API
- Configuration - Full config reference
- Routes - Define endpoints
- Database - Database operations