Complete guide for deploying FlowCheck using Docker.
- Quick Start
- Local Development
- Production Deployment
- Image Variants
- Configuration
- Health Checks
- Troubleshooting
Get FlowCheck running in 30 seconds:
# Clone the repository
git clone https://github.com/backslash-ux/flowcheck.git
cd flowcheck
# Configure environment
cp .env.example .env
# Edit .env with your API keys
nano .env
# Start the stack
docker-compose upFlowCheck is now running at http://localhost:8000
For active development with hot-reload:
# Start development container
docker-compose -f docker-compose.dev.yml up
# Inside container, install in editable mode
pip install -e .
# Run tests
pytest
# Start server
flowcheck-serverAll changes in your local src/ directory are immediately reflected in the container.
- Docker Engine 20.10+
- Docker Compose 2.0+
- 2GB RAM minimum
- 100MB disk space for data volume
- Clone and configure:
git clone https://github.com/backslash-ux/flowcheck.git
cd flowcheck
cp .env.example .env- Set production values in .env:
FLOWCHECK_LOG_LEVEL=INFO # Not DEBUG
ANTHROPIC_API_KEY=sk-ant-xxxxx
OPENAI_API_KEY=sk-xxxxx- Build production image:
docker build -t flowcheck:v0.4 .
docker tag flowcheck:v0.4 flowcheck:latest- Start the stack:
docker-compose up -d- Verify health:
docker ps # Should show flowcheck-server running
docker logs -f flowcheck-serverData is stored in the flowcheck-data Docker volume:
# Backup data
docker run --rm -v flowcheck-data:/data \
-v $(pwd):/backup \
alpine tar czf /backup/flowcheck-backup.tar.gz /data
# Restore from backup
docker run --rm -v flowcheck-data:/data \
-v $(pwd):/backup \
alpine tar xzf /backup/flowcheck-backup.tar.gz -C /To run multiple instances with load balancing:
# docker-compose.prod.yml
version: '3.8'
services:
flowcheck-1:
# ... base config
flowcheck-2:
# ... base config
nginx:
image: nginx:alpine
ports:
- "8000:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf- Base: python:3.13-slim
- Size: ~140MB
- Use case: Production deployments
- Features: Full feature set
docker run -it flowcheck:latest flowcheck-server- Base: python:3.13-slim
- Size: ~120MB
- Use case: Memory-constrained environments
- Trade-off: Minimal dependencies
docker build -f Dockerfile.slim -t flowcheck:slim .
docker run -it flowcheck:slim flowcheck-server- Base: python:3.13-slim
- Size: ~180MB
- Use case: Development and debugging
- Includes: pytest, dev tools, git
docker build -f Dockerfile.dev -t flowcheck:dev .
docker run -it flowcheck:dev bashAll configuration is via environment variables. See .env.example for complete reference.
docker run \
-v ~/.flowcheck:/root/.flowcheck \ # Read rules
-v /data/flowcheck:/data/flowcheck \ # Persist data
flowcheck:latest# Default (localhost only)
docker run -p 8000:8000 flowcheck:latest
# Public interface
docker run -p 0.0.0.0:8000:8000 flowcheck:latest
# Custom port
docker run -p 9000:8000 flowcheck:latestdocker run \
--health-cmd='flowcheck-server --version' \
--health-interval=30s \
--health-timeout=10s \
--health-retries=3 \
flowcheck:latest# Inside container
flowcheck-server --version
# Or from host
curl http://localhost:8000/health# Check health status
docker ps --format "{{.Names}}\t{{.Status}}"
# View health details
docker inspect --format='{{.State.Health.Status}}' flowcheck-serverSymptom: docker-compose up fails or container exits immediately
Solutions:
- Check logs:
docker logs flowcheck-server - Verify environment:
cat .env(check API keys) - Check disk space:
df -h
Symptom: bind: address already in use
Solution:
# Find process using port 8000
lsof -i :8000
# Or use different port
docker-compose --project-name flowcheck-alt upSymptom: Container OOMKilled or slow performance
Solution:
# Increase Docker memory limit
# Edit Docker Desktop Preferences → Resources → Memory
# Or use slim variant
docker build -f Dockerfile.slim -t flowcheck:slim .Symptom: 401 Unauthorized errors
Solutions:
- Verify key format:
echo $ANTHROPIC_API_KEY - Check env file is loaded:
docker exec flowcheck-server env | grep API - Test key directly:
curl -H "Authorization: Bearer $API_KEY" https://api.anthropic.com/v1/models
Symptom: docker logs shows nothing
Solution:
# Check container is running
docker ps | grep flowcheck
# View all logs (including stopped containers)
docker logs --all flowcheck-server
# Stream logs in real-time
docker logs -f flowcheck-serverBuild for both amd64 and arm64:
docker buildx create --name builder
docker buildx use builder
docker buildx build --platform linux/amd64,linux/arm64 -t flowcheck:latest .docker tag flowcheck:latest backslash-ux/flowcheck:v0.4
docker login
docker push backslash-ux/flowcheck:v0.4# Create custom network
docker network create flowcheck-net
# Connect containers
docker run --network flowcheck-net --name server flowcheck:latest
docker run --network flowcheck-net --name client flowcheck:latest bash- Use slim variant for low-memory environments
- Enable BuildKit for faster builds:
export DOCKER_BUILDKIT=1 - Layer caching: Dockerfile order matters; stable layers first
- Volume performance: Use native volumes, not mounts (on macOS)
- Non-root user: Images run as
flowcheckuser (UID 999) - Read-only filesystem (optional):
docker run --read-only - Resource limits:
docker run --memory 512m --cpus 0.5 - Network policies: Use Docker networks, not host network
- Image scanning:
docker scan flowcheck:latest