services:
  archive-worker:
    build: .
    image: local-page-archiver:latest
    environment:
      ARCHIVE_PATH: /archives
      ARCHIVE_WORKER_XVFB: "1"
    volumes:
      - ./archives:/archives
    shm_size: 1gb
    command: ["archive", "${URL:?Set URL=https://example.com}", "--json"]

  archive-worker-vnc:
    profiles: ["debug"]
    build: .
    image: local-page-archiver:latest
    environment:
      ARCHIVE_PATH: /archives
      ARCHIVE_WORKER_XVFB: "1"
      ARCHIVE_WORKER_VNC: "1"
    volumes:
      - ./archives:/archives
    ports:
      - "5900:5900"
    shm_size: 1gb
    command: ["archive", "${URL:?Set URL=https://example.com}", "--json"]
