version: '3.8'

services:
  pdf-splitter:
    build: .
    container_name: pdf-splitter
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - PORT=3000
      # Change this to enable password protection. Leave empty or remove to disable.
      - APP_PASSWORD=your_secure_password_here
      # Optional: Add a second admin password for higher access level
      - ADMIN_PASSWORD=your_admin_password_here
    volumes:
      # Optional: persist uploads across container restarts
      # (files will still be auto-cleaned when users disconnect)
      - pdf-uploads:/app/uploads
    tmpfs:
      # Use tmpfs for faster I/O on temporary uploads
      - /tmp:size=512M

volumes:
  pdf-uploads:
    driver: local
