If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.
This add-on installs Playwright and browsers (Chromium, Firefox, WebKit) in the
DDEV web container so you can run tests against the project’s internal network and
dependencies. It also configures X11 forwarding for headed mode (visible browser windows on the host).
ddev add-on get MurzNN/ddev-playwright
web container build (web-build/Dockerfile.playwright).npx playwright install after each container start to keep browsers up to date.~/.cache/ms-playwright so multiple DDEV projects reuse the same downloads.By default the add-on:
xhost +local:docker on the host before start./tmp/.X11-unix into the web container.DISPLAY=:0 in the container.LIBGL_ALWAYS_SOFTWARE=1 so Chromium/Mesa do not hang trying to use GPU/DRM inside Docker when no window appears.When bind-mounting /tmp/.X11-unix is not possible (for example rootless Docker on macOS), use the commented
alternative in .ddev/config.playwright.yaml:
web_environment:
- DISPLAY=host.docker.internal:0
You still need xhost +local:docker (or equivalent) on the host so Docker can connect to the X server.
Contributed and maintained by @MurzNN
If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.