Skip to content

fix(docker): keep ISR and suffix-list caches writable on a read-only root - #9829

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/readonly-root-route-cache
Nov 10, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/readonly-root-route-cache

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • App image: declare .next/server/route-cache as a VOLUME (created and owned by the app user). Next 16.4 writes every revalidated (ISR) page and route handler response there, so on a read-only root filesystem each revalidation failed with EROFS and the result was never persisted; pages kept serving from the in-memory cache
  • PII image: set TLDEXTRACT_CACHE=/tmp/tldextract. tldextract (pulled in by Presidio) caches the Public Suffix List under $HOME/.cache, which is read-only there, so it fell back to its bundled snapshot and warned on every start
  • Both paths sit on writable task volumes once the companion infra change mounts route-cache; on a writable root nothing changes

Type of Change

  • Bug fix

Testing

  • Dockerfile-only; the image builds run on the staging push
  • Confirmed in the Next 16.4 source that file-system-cache writes route-cache/ under the server dist dir, and in tldextract 5.4.0 (cache.py) that TLDEXTRACT_CACHE overrides the cache dir

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
docs Ready Ready Preview Nov 10, 2026 6:29am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge with the companion deployment mounts described by the author.

Summary

The PR gives both images writable cache locations for read-only deployments.

  • The app image gives Next.js a writable place to save revalidated responses.
  • The PII service saves its suffix-list cache under /tmp.

Reviews (1) · Last reviewed commit: "fix(docker): keep ISR and suffix-list ca..." · Reviewed by Greptile

@waleedlatif1
waleedlatif1 merged commit 20a924c into staging Nov 10, 2026
74 checks passed

This branch was successfully deployed

1 active deployment
Preview — 0bd6dde9 Deployed Nov 10, 2026 by vercel[bot]
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.

1 participant