Skip to content

Instantly share code, notes, and snippets.

@JosephLeedy
Created July 9, 2025 19:48
Show Gist options
  • Save JosephLeedy/59bf44e412b663c0b50f7d34fe4d6bce to your computer and use it in GitHub Desktop.
Save JosephLeedy/59bf44e412b663c0b50f7d34fe4d6bce to your computer and use it in GitHub Desktop.
Warden Docker Compose config for Playwright UI
services:
playwright:
depends_on:
- nginx
hostname: ${WARDEN_ENV_NAME}-playwright
image: mcr.microsoft.com/playwright:${PLAYWRIGHT_VERSION}
labels:
- traefik.enable=true
- traefik.http.routers.${WARDEN_ENV_NAME}-playwright.tls=true
- traefik.http.routers.${WARDEN_ENV_NAME}-playwright.rule=Host(`playwright.${TRAEFIK_DOMAIN}`)
- traefik.http.services.${WARDEN_ENV_NAME}-playwright.loadbalancer.server.port=3001
- traefik.docker.network=${WARDEN_ENV_NAME}_default
working_dir: /data
command: /bin/sh -c "npx -y playwright test --ui-host 0.0.0.0 --ui-port 3001"
init: true
ipc: host
environment:
CI: true
extra_hosts:
- ${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
- ${TRAEFIK_SUBDOMAIN:-app}.${TRAEFIK_DOMAIN}:${TRAEFIK_ADDRESS:-0.0.0.0}
volumes:
- .${WARDEN_WEB_ROOT:-}/${PLAYWRIGHT_TEST_DIR}/:/data:cached
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment