Skip to content

Advanced Deployment Options

Fast-Crawl is designed for both simple and advanced production deployments. Here are some recommended strategies:

1. Docker Compose (Multi-Service)

Use docker-compose.yml to run Fast-Crawl alongside Valkey/Redis and other dependencies:

yaml
version: '3.8'
services:
  fast-crawl:
    build: .
    ports:
      - "3000:3000"
    environment:
      - REDIS_HOST=valkey
      - JWT_SECRET=your-secret
      - OLLAMA_HOST=http://ollama:11434
    depends_on:
      - valkey
  valkey:
    image: valkey/valkey:latest
    ports:
      - "6379:6379"

2. Kubernetes

For high-availability and scaling:

  • Use a Deployment for Fast-Crawl and a StatefulSet for Valkey/Redis.
  • Configure environment variables and secrets via Kubernetes ConfigMap and Secret.
  • Use a Service and Ingress for API exposure.

3. Cloud Providers

  • Deploy with managed Redis (e.g., AWS ElastiCache, Azure Cache for Redis).
  • Use Docker images or buildpacks for serverless/container platforms (e.g., AWS ECS, Google Cloud Run).

4. Horizontal Scaling

  • Run multiple Fast-Crawl instances behind a load balancer.
  • Use Valkey/Redis for shared caching and coordination.

5. Monitoring & Logging

  • Integrate with Grafana, Prometheus, or ELK stack for metrics and logs.
  • Use Winston logs (see src/logger.ts) for structured output.

6. Security

  • Set strong JWT_SECRET and API_KEY values.
  • Use HTTPS and secure your endpoints.

For more, see the GitHub repo or open an issue for deployment help.