Skip to content

fix(docker): add persistent disk cache for IPX image optimization#14

Merged
vianmora merged 3 commits into
mainfrom
fix/ipx-persistent-cache-v2
May 17, 2026
Merged

fix(docker): add persistent disk cache for IPX image optimization#14
vianmora merged 3 commits into
mainfrom
fix/ipx-persistent-cache-v2

Conversation

@vianmora

Copy link
Copy Markdown
Contributor

Summary

  • Patch [_image].$.ts at publish time to add ipxFSCache({ dir: "/var/cache/ipx" }) to the createIPX call and inject ipxFSCache into the ipx import
  • Mount a named Docker volume (${imageName}-ipx-cache) at /var/cache/ipx in docker run so the cache persists across container restarts and republications

Test plan

  • Publish a site in Docker SSR mode and load an image — first load should process and cache it
  • Restart the container (docker restart ws-<domain>) and reload — image should be served from cache (fast, no re-processing)
  • Republish the site — new container should reuse the same named volume
  • Verify [_image].$.ts in the generated workdir contains ipxFSCache import and option after publish

Closes #12

🤖 Generated with Claude Code

vianmora and others added 3 commits May 16, 2026 09:23
Patch [_image].$.ts at publish time to inject ipxFSCache({ dir: "/var/cache/ipx" })
into the createIPX call and add ipxFSCache to the ipx import. Mount a named Docker
volume (${imageName}-ipx-cache) at /var/cache/ipx so processed images survive
container restarts and republications without re-processing.

Closes #12

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… import

The multi-line import in the react-router-docker template ends with
a trailing comma + newline, causing the regex replacement to produce
`, ipxFSCache` on its own line — invalid syntax for esbuild.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vianmora vianmora merged commit 8d555bf into main May 17, 2026
1 check passed
@vianmora vianmora deleted the fix/ipx-persistent-cache-v2 branch May 17, 2026 16:00
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.

feat(docker): add persistent disk cache for IPX image optimization

1 participant