Skip to content

fix(website): install Playwright system deps in Docker build#4151

Closed
NicholasKissel wants to merge 1 commit intochangelog-2026-06from
02-06-fix_website_install_playwright_system_deps_in_docker_build
Closed

fix(website): install Playwright system deps in Docker build#4151
NicholasKissel wants to merge 1 commit intochangelog-2026-06from
02-06-fix_website_install_playwright_system_deps_in_docker_build

Conversation

@NicholasKissel
Copy link
Member

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-4151 February 6, 2026 23:14 Destroyed
@railway-app
Copy link

railway-app bot commented Feb 6, 2026

🚅 Deployed to the rivet-pr-4151 environment in rivet-frontend

Service Status Web Updated (UTC)
website 😴 Sleeping (View Logs) Web Feb 6, 2026 at 11:24 pm
frontend-inspector ❌ Build Failed (View Logs) Web Feb 6, 2026 at 11:15 pm
mcp-hub ✅ Success (View Logs) Web Feb 6, 2026 at 11:15 pm
frontend-cloud ❌ Build Failed (View Logs) Web Feb 6, 2026 at 11:14 pm

Copy link
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link

claude bot commented Feb 6, 2026

Code Review

Summary

This PR fixes the Docker build for the website by adding the --with-deps flag to the Playwright installation command. This ensures that Playwright's system dependencies (required for running Chromium in a headless environment) are installed alongside the browser binary.

Analysis

Root Cause: The website uses rehype-mermaid (line 6 in website/src/mdx/rehype.ts:6) to render mermaid diagrams during the build process. This library requires Playwright with Chromium to render diagrams as images. Without the system dependencies, Playwright's Chromium browser cannot launch in the Docker environment, causing build failures.

The Fix: Adding --with-deps to the playwright install command ensures all required system libraries (like graphics libraries, fonts, etc.) are installed.

Review

Correctness: The fix is correct and addresses the root cause. The --with-deps flag is the recommended approach for installing Playwright in Docker/CI environments.

Comment Quality: The updated comment accurately describes the purpose - "Install Playwright browsers and system dependencies for mermaid rendering" - which is more informative than the previous comment.

Minimal Change: This is appropriately scoped - only changes what's necessary to fix the issue.

Convention Alignment: Follows the repo's conventional commit format: fix(website): ...

Considerations

Build Time Impact: Installing system dependencies will increase the Docker image build time and size. However, this is necessary for the functionality to work, and the multi-stage build pattern already ensures the final serving image (Caddy) remains lean.

Alternative Approaches (for future consideration):

  1. Pre-rendering mermaid diagrams in a separate build step and caching them
  2. Using a different mermaid rendering approach that doesn't require a headless browser
  3. Installing only the minimal required dependencies instead of --with-deps

However, for the immediate fix, this approach is appropriate.

Recommendation

Approve

This is a straightforward bug fix that correctly addresses the Docker build failure. The change is minimal, well-commented, and follows best practices for Playwright in containerized environments.

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