playwright docker mcp with vnc
This commit is contained in:
32
openwebui/mcp-servers/docker-compose.yml
Normal file
32
openwebui/mcp-servers/docker-compose.yml
Normal file
@@ -0,0 +1,32 @@
|
||||
services:
|
||||
sequential:
|
||||
container_name: sequential_thinking
|
||||
build:
|
||||
context: .
|
||||
dockerfile: npx-uvx.Dockerfile
|
||||
# restart: always
|
||||
command: uvx mcpo --port 3901 -- npx -y @modelcontextprotocol/server-sequential-thinking
|
||||
ports:
|
||||
- 3901:3901
|
||||
|
||||
playwright:
|
||||
container_name: playwrite_mcp
|
||||
build:
|
||||
context: .
|
||||
dockerfile: playwright.Dockerfile
|
||||
# restart: always
|
||||
ports:
|
||||
- "3902:3902" # MCP port
|
||||
|
||||
playwright_novnc:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: novnc.Dockerfile
|
||||
container_name: playwrite_novnc
|
||||
ports:
|
||||
- "6080:6080" # noVNC web access
|
||||
depends_on:
|
||||
- playwright
|
||||
# restart: always
|
||||
command: >
|
||||
websockify --web=/opt/novnc --wrap-mode=ignore 6080 playwrite_mcp:5900
|
||||
13
openwebui/mcp-servers/novnc.Dockerfile
Normal file
13
openwebui/mcp-servers/novnc.Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM python:3.10-slim
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y git curl && \
|
||||
git clone https://github.com/novnc/noVNC.git /opt/novnc && \
|
||||
pip install websockify && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/novnc
|
||||
|
||||
RUN echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0; url=/vnc.html"></head><body></body></html>' > /opt/novnc/index.html
|
||||
EXPOSE 6080
|
||||
CMD ["websockify", "--web=/opt/novnc", "6080", "playwright:5900"]
|
||||
9
openwebui/mcp-servers/npx-uvx.Dockerfile
Normal file
9
openwebui/mcp-servers/npx-uvx.Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM ghcr.io/astral-sh/uv:debian
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
nodejs \
|
||||
npm \
|
||||
&& npm install -g n \
|
||||
&& n stable \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
51
openwebui/mcp-servers/playwright.Dockerfile
Normal file
51
openwebui/mcp-servers/playwright.Dockerfile
Normal file
@@ -0,0 +1,51 @@
|
||||
FROM debian
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
curl \
|
||||
gnupg \
|
||||
xvfb \
|
||||
x11vnc \
|
||||
fluxbox \
|
||||
chromium \
|
||||
ca-certificates \
|
||||
x11-utils \
|
||||
nodejs \
|
||||
npm \
|
||||
make \
|
||||
g++ \
|
||||
pip \
|
||||
&& npm install -g n \
|
||||
&& n stable \
|
||||
&& apt-get install -y pipx python3-venv \
|
||||
&& pipx install uv \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
ENV PATH="/root/.local/bin:${PATH}"
|
||||
|
||||
RUN npx playwright install chrome
|
||||
|
||||
# Environment variables
|
||||
ENV DISPLAY=:99
|
||||
ENV SCREEN_RESOLUTION=1280x720x24
|
||||
|
||||
# Startup script
|
||||
RUN cat <<'EOF' > /playwright-start.sh
|
||||
#!/bin/bash
|
||||
|
||||
# Start virtual display
|
||||
Xvfb :99 -screen 0 $SCREEN_RESOLUTION &
|
||||
sleep 2
|
||||
|
||||
# Start window manager
|
||||
fluxbox &
|
||||
|
||||
# Start VNC server
|
||||
x11vnc -nopw -display :99 -forever -shared &
|
||||
|
||||
# Start Playwright MCP
|
||||
uvx mcpo --port 3902 -- npx -y @playwright/mcp@latest --no-sandbox
|
||||
EOF
|
||||
|
||||
RUN chmod +x /playwright-start.sh
|
||||
|
||||
CMD ["/playwright-start.sh"]
|
||||
Reference in New Issue
Block a user