Skip to content

Modernize the screenie runtime and deployment stack#30

Merged
stianpr merged 4 commits intomasterfrom
update-packages
Apr 13, 2026
Merged

Modernize the screenie runtime and deployment stack#30
stianpr merged 4 commits intomasterfrom
update-packages

Conversation

@stianpr
Copy link
Copy Markdown
Member

@stianpr stianpr commented Sep 18, 2025

Update the service to use the current Puppeteer stack and tighten the request lifecycle around it.

Replace the old browser pool with puppeteer-cluster, refresh the runtime dependencies, and require Node.js 20. Improve request validation and error handling for invalid URLs, unsupported formats, upstream load failures, and shutdown behavior so the server fails more predictably.

Modernize the container and release plumbing by updating the Docker image to use system Chromium with a non-root runtime, refreshing the publish workflow, and syncing the README and changelog with the current behavior.

- Replace puppeteer-pool with puppeteer-cluster (concurrency via
  contexts)
- Update dependencies (Puppeteer, Koa, Winston) and require Node >=20
- Add structured/log-format improvements (JSON option, colorized dev
  output, stack traces)
- Introduce cluster sizing vars (SCREENIE_CLUSTER_MIN / MAX, fallback to
  legacy POOL vars)
- Improve error handling & graceful SIGTERM shutdown (cluster.idle +
  close)
- Modernize Dockerfile: Node 20 slim, system Chromium, non-root user,
  npm ci, build arg PUPPETEER_SKIP_DOWNLOAD
- Add .dockerignore to shrink build context
- Add GitHub Actions workflow (multi-arch build & push to GHCR with
  cache)
- Add package-lock.json and caching-friendly Docker layer ordering
- Update README for new org (mailmojo), cluster usage, new env vars,
  Docker instructions
- Enhance logging clarity & reduce noisy missing-url errors path (docs
  guidance)

BREAKING CHANGE:
- Node.js version requirement raised to >=20.
- puppeteer-pool removed; replace SCREENIE_POOL_* with SCREENIE_CLUSTER_* (legacy names still recognized but should be migrated).
- New logging format (may affect log parsers if relying on previous plain output).
@stianpr stianpr requested a review from fdanielsen September 18, 2025 09:45
@stianpr stianpr self-assigned this Sep 18, 2025
@stianpr stianpr changed the title Migrate to puppeteer-cluster, modernize runtime & delivery Modernize the screenie runtime and deployment stack Apr 8, 2026
Copy link
Copy Markdown
Member

@fdanielsen fdanielsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I've tested a local build of the Docker image and used it in our local app stack running simple tests.

Just consider changing the new version everywhere to 5.0.0.

Comment thread CHANGES.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
@stianpr stianpr merged commit ec96d51 into master Apr 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants