x-defaults: &defaults restart: unless-stopped logging: driver: json-file options: max-size: 100m max-file: "3" x-common-env: &common-env REDIS_URL: ${REDIS_URL:-redis://redis:6379} REDIS_RATE_LIMIT_URL: ${REDIS_URL:-redis://redis:6379} PLAYWRIGHT_MICROSERVICE_URL: ${PLAYWRIGHT_MICROSERVICE_URL:-http://playwright-service:3000/scrape} NUQ_DATABASE_URL: ${NUQ_DATABASE_URL:-postgres://postgres:postgres@nuq-postgres:5432/postgres} USE_DB_AUTHENTICATION: ${USE_DB_AUTHENTICATION:-false} OPENAI_API_KEY: ${OPENAI_API_KEY:-} OPENAI_BASE_URL: ${OPENAI_BASE_URL:-} MODEL_NAME: ${MODEL_NAME:-} MODEL_EMBEDDING_NAME: ${MODEL_EMBEDDING_NAME:-} OLLAMA_BASE_URL: ${OLLAMA_BASE_URL:-} SLACK_WEBHOOK_URL: ${SLACK_WEBHOOK_URL:-} BULL_AUTH_KEY: ${BULL_AUTH_KEY:-@} TEST_API_KEY: ${TEST_API_KEY:-} POSTHOG_API_KEY: ${POSTHOG_API_KEY:-} POSTHOG_HOST: ${POSTHOG_HOST:-} SUPABASE_ANON_TOKEN: ${SUPABASE_ANON_TOKEN:-} SUPABASE_URL: ${SUPABASE_URL:-} SUPABASE_SERVICE_TOKEN: ${SUPABASE_SERVICE_TOKEN:-} SELF_HOSTED_WEBHOOK_URL: ${SELF_HOSTED_WEBHOOK_URL:-} SERPER_API_KEY: ${SERPER_API_KEY:-} SEARCHAPI_API_KEY: ${SEARCHAPI_API_KEY:-} LOGGING_LEVEL: ${LOGGING_LEVEL:-info} PROXY_SERVER: ${PROXY_SERVER:-} PROXY_USERNAME: ${PROXY_USERNAME:-} PROXY_PASSWORD: ${PROXY_PASSWORD:-} SEARXNG_ENDPOINT: ${SEARXNG_ENDPOINT:-} SEARXNG_ENGINES: ${SEARXNG_ENGINES:-} SEARXNG_CATEGORIES: ${SEARXNG_CATEGORIES:-} services: playwright-service: <<: *defaults image: ghcr.io/firecrawl/playwright-service:${PLAYWRIGHT_VERSION:-latest} environment: PORT: 3000 PROXY_SERVER: ${PROXY_SERVER:-} PROXY_USERNAME: ${PROXY_USERNAME:-} PROXY_PASSWORD: ${PROXY_PASSWORD:-} BLOCK_MEDIA: ${BLOCK_MEDIA:-true} deploy: resources: limits: cpus: "1.0" memory: 1G reservations: cpus: "0.5" memory: 512M api: <<: *defaults image: ghcr.io/firecrawl/firecrawl:${FIRECRAWL_VERSION:-latest} environment: <<: *common-env HOST: 0.0.0.0 PORT: ${INTERNAL_PORT:-3002} EXTRACT_WORKER_PORT: ${EXTRACT_WORKER_PORT:-3004} WORKER_PORT: ${WORKER_PORT:-3005} ENV: local depends_on: redis: condition: service_healthy playwright-service: condition: service_started nuq-postgres: condition: service_started ports: - "${FIRECRAWL_PORT_OVERRIDE:-3002}:${INTERNAL_PORT:-3002}" command: node dist/src/harness.js --start-docker deploy: resources: limits: cpus: "2.0" memory: 4G reservations: cpus: "1.0" memory: 2G healthcheck: test: [ "CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3002/health", ] interval: 30s timeout: 10s retries: 3 start_period: 30s redis: <<: *defaults image: redis:${REDIS_VERSION:-alpine} command: redis-server --bind 0.0.0.0 volumes: - redis_data:/data deploy: resources: limits: cpus: "0.5" memory: 512M reservations: cpus: "0.25" memory: 256M healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 3s retries: 3 start_period: 5s nuq-postgres: <<: *defaults image: ghcr.io/firecrawl/nuq-postgres:${NUQ_POSTGRES_VERSION:-latest} environment: POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} POSTGRES_DB: ${POSTGRES_DB:-postgres} ports: - "${POSTGRES_PORT_OVERRIDE:-5432}:5432" volumes: - postgres_data:/var/lib/postgresql/data deploy: resources: limits: cpus: "1.0" memory: 1G reservations: cpus: "0.5" memory: 512M healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"] interval: 10s timeout: 5s retries: 5 start_period: 10s volumes: redis_data: postgres_data: