Firecrawl¶
Scraper web self-hosted con renderizado JavaScript. Stack completo con Redis, RabbitMQ, Playwright y PostgreSQL.
📁 Rutas y configs¶
| Qué | Dónde |
|---|---|
| Compose | /opt/docker/firecrawl/compose.yaml |
| Variables de entorno | /opt/docker/firecrawl/.env |
Contenedores: firecrawl-api, firecrawl-redis, firecrawl-playwright, firecrawl-rabbitmq, firecrawl-postgres Puerto: 3002 (solo red interna)
Compose¶
services:
firecrawl-api:
image: ghcr.io/firecrawl/firecrawl:latest
container_name: firecrawl-api
restart: unless-stopped
environment:
HOST: "0.0.0.0"
PORT: "3002"
INTERNAL_PORT: "3002"
ENV: "local"
USE_DB_AUTHENTICATION: "false"
REDIS_URL: "redis://firecrawl-redis:6379"
REDIS_RATE_LIMIT_URL: "redis://firecrawl-redis:6379"
PLAYWRIGHT_MICROSERVICE_URL: "http://firecrawl-playwright:3000/scrape"
POSTGRES_USER: "firecrawl"
POSTGRES_PASSWORD: "${FIRECRAWL_POSTGRES_PASSWORD:-firecrawl_dev_pass}"
POSTGRES_DB: "firecrawl"
POSTGRES_HOST: "firecrawl-postgres"
POSTGRES_PORT: "5432"
NUQ_RABBITMQ_URL: "amqp://firecrawl-rabbitmq:5672"
BULL_AUTH_KEY: "${FIRECRAWL_BULL_KEY:-CHANGEME}"
WORKER_PORT: "3005"
EXTRACT_WORKER_PORT: "3004"
NUM_WORKERS_PER_QUEUE: "4"
MAX_CONCURRENT_JOBS: "3"
LOGGING_LEVEL: "info"
command: ["node", "dist/src/harness.js", "--start-docker"]
depends_on:
firecrawl-redis:
condition: service_started
firecrawl-playwright:
condition: service_started
firecrawl-rabbitmq:
condition: service_healthy
firecrawl-postgres:
condition: service_started
networks:
- ai_shared
firecrawl-redis:
image: redis:alpine
container_name: firecrawl-redis
restart: unless-stopped
command: redis-server --bind 0.0.0.0 --maxmemory 256mb --maxmemory-policy allkeys-lru
networks:
- ai_shared
firecrawl-playwright:
image: ghcr.io/firecrawl/playwright-service:latest
container_name: firecrawl-playwright
restart: unless-stopped
environment:
PORT: "3000"
MAX_CONCURRENT_PAGES: "5"
BLOCK_MEDIA: "true"
networks:
- ai_shared
firecrawl-rabbitmq:
image: rabbitmq:3-management-alpine
container_name: firecrawl-rabbitmq
restart: unless-stopped
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "check_running"]
interval: 5s
timeout: 5s
retries: 3
start_period: 10s
networks:
- ai_shared
firecrawl-postgres:
image: ghcr.io/firecrawl/nuq-postgres:latest
container_name: firecrawl-postgres
restart: unless-stopped
environment:
POSTGRES_USER: "firecrawl"
POSTGRES_PASSWORD: "${FIRECRAWL_POSTGRES_PASSWORD:-firecrawl_dev_pass}"
POSTGRES_DB: "firecrawl"
networks:
- ai_shared
networks:
ai_shared:
external: true