x-default: &default restart: unless-stopped logging: driver: json-file options: max-size: 100m max-file: "3" services: firecrawl: <<: *default image: mendableai/firecrawl:${FIRECRAWL_VERSION:-v1.16.0} ports: - "${FIRECRAWL_PORT_OVERRIDE:-3002}:3002" environment: TZ: ${TZ:-UTC} REDIS_URL: redis://:${REDIS_PASSWORD:-firecrawl}@redis:6379 PLAYWRIGHT_MICROSERVICE_URL: http://playwright:3000 PORT: 3002 NUM_WORKERS_PER_QUEUE: ${NUM_WORKERS_PER_QUEUE:-8} SCRAPE_RATE_LIMIT_TOKEN_BUCKET_SIZE: ${SCRAPE_RATE_LIMIT_TOKEN_BUCKET_SIZE:-20} SCRAPE_RATE_LIMIT_TOKEN_BUCKET_REFILL: ${SCRAPE_RATE_LIMIT_TOKEN_BUCKET_REFILL:-1} depends_on: redis: condition: service_healthy playwright: condition: service_started 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: <<: *default image: redis:${REDIS_VERSION:-7.4.2-alpine} command: redis-server --requirepass ${REDIS_PASSWORD:-firecrawl} --appendonly yes environment: - TZ=${TZ:-UTC} volumes: - redis_data:/data deploy: resources: limits: cpus: '1.0' memory: 512M reservations: cpus: '0.5' memory: 256M healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 10s timeout: 3s retries: 3 start_period: 5s playwright: <<: *default image: mendableai/firecrawl-playwright:${PLAYWRIGHT_VERSION:-latest} environment: TZ: ${TZ:-UTC} PORT: 3000 PROXY_SERVER: ${PROXY_SERVER:-} PROXY_USERNAME: ${PROXY_USERNAME:-} PROXY_PASSWORD: ${PROXY_PASSWORD:-} BLOCK_MEDIA: ${BLOCK_MEDIA:-true} deploy: resources: limits: cpus: '2.0' memory: 2G reservations: cpus: '1.0' memory: 1G volumes: redis_data: