services: pdf-prod: build: . container_name: pdf-prod restart: always ports: - "7860:7860" environment: - NODE_ENV=production - PORT=7860 # Hugging Face free tier = 2 vCPU / 16GB → PDF browser pool of 2. # page.pdf() is CPU-bound; pool size = max concurrent PDF jobs. - PDF_POOL_SIZE=2 - WIDGET_MAX_CONCURRENT=3 logging: driver: "json-file" options: max-size: "10m" max-file: "3" pdf-test: build: . container_name: pdf-test restart: always ports: - "17861:7860" environment: - NODE_ENV=test - PORT=7860 # Local test machine: multi-core → larger pool for finding max capacity. # Tune with: docker compose up -d --build pdf-test (edit here or override) - PDF_POOL_SIZE=4 - WIDGET_MAX_CONCURRENT=3 logging: driver: "json-file" options: max-size: "10m" max-file: "3"