BloxServer API (FastAPI + SQLAlchemy async): - Database models: users, flows, triggers, executions, usage tracking - Clerk JWT auth with dev mode bypass for local testing - SQLite support for local dev, PostgreSQL for production - CRUD routes for flows, triggers, executions - Public webhook endpoint with token auth - Health/readiness endpoints - Pydantic schemas with camelCase aliases for frontend - Docker + docker-compose setup Architecture documentation: - Librarian architecture with RLM-powered query engine - Stripe billing integration (usage-based, trials, webhooks) - LLM abstraction layer (rate limiting, semantic cache, failover) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
72 lines
2 KiB
YAML
72 lines
2 KiB
YAML
# BloxServer Development Docker Compose
|
|
# Run with: docker-compose up -d
|
|
|
|
version: '3.8'
|
|
|
|
services:
|
|
# ==========================================================================
|
|
# PostgreSQL Database
|
|
# ==========================================================================
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
container_name: bloxserver-postgres
|
|
environment:
|
|
POSTGRES_USER: postgres
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_DB: bloxserver
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# ==========================================================================
|
|
# Redis (for caching, rate limiting, queues)
|
|
# ==========================================================================
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: bloxserver-redis
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
# ==========================================================================
|
|
# BloxServer API
|
|
# ==========================================================================
|
|
api:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: bloxserver-api
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- ENV=development
|
|
- DATABASE_URL=postgresql+asyncpg://postgres:postgres@postgres:5432/bloxserver
|
|
- REDIS_URL=redis://redis:6379
|
|
- AUTO_CREATE_TABLES=true
|
|
- ENABLE_DOCS=true
|
|
- CORS_ORIGINS=http://localhost:3000
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
volumes:
|
|
# Mount source for hot reload in development
|
|
- .:/app/bloxserver:ro
|
|
command: uvicorn bloxserver.api.main:app --host 0.0.0.0 --port 8000 --reload
|
|
|
|
volumes:
|
|
postgres_data:
|
|
redis_data:
|