Compare commits

...

14 Commits

Author SHA1 Message Date
samanhappy
40d8792294 fix: update Dockerfile to conditionally install Playwright dependencies for Chrome based on architecture 2025-04-14 20:01:24 +08:00
samanhappy
7f887a7031 fix: update Dockerfile to install Playwright dependencies for Chrome instead of Chromium 2025-04-14 19:56:19 +08:00
samanhappy
5a2be4d4fe fix: update Dockerfile to set Playwright browser path and remove unnecessary environment variable 2025-04-14 19:34:07 +08:00
samanhappy
f6c5cde9ce fix: update Dockerfile to set Playwright browser path and environment variables 2025-04-14 19:25:26 +08:00
samanhappy
1e6d10a0c3 fix: update Dockerfile to install Playwright dependencies for Chromium instead of Firefox 2025-04-14 18:56:12 +08:00
samanhappy
1ea8c3c866 fix: update Dockerfile to conditionally install Playwright dependencies based on INSTALL_EXT argument 2025-04-14 17:09:21 +08:00
samanhappy
6b56a9a554 fix: update Playwright installation to use Chrome instead of Chromium 2025-04-14 16:53:32 +08:00
samanhappy
a1d2c679d6 fix: install Chromium for Playwright in Dockerfile 2025-04-13 22:12:20 +08:00
samanhappy
fe10273fc3 fix: update Playwright installation to include default browser 2025-04-13 22:03:47 +08:00
samanhappy
649a454ba8 fix: install Chrome for Playwright in Dockerfile 2025-04-13 21:54:48 +08:00
samanhappy
bc8be7578f fix: set up PNPM environment variables and directory for global installations 2025-04-13 21:35:29 +08:00
samanhappy
c5a8cfd88f fix: change Python base image from alpine to slim-bookworm 2025-04-13 21:31:26 +08:00
samanhappy
8905757c69 fix: update Python base image to 3.13-alpine and streamline package installation 2025-04-13 21:29:36 +08:00
samanhappy
09b8a478b9 fix: add platforms specification for Docker build in workflow 2025-04-13 16:21:36 +08:00
2 changed files with 26 additions and 6 deletions

View File

@@ -8,6 +8,9 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
variant: [base, full]
steps:
- uses: actions/checkout@v4
with:
@@ -28,9 +31,10 @@ jobs:
with:
images: samanhappy/mcphub
tags: |
type=raw,value=edge,enable=${{ github.ref == 'refs/heads/main' }}
type=semver,pattern={{version}},enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=raw,value=edge${{ matrix.variant == 'full' && '-full' || '' }},enable=${{ github.ref == 'refs/heads/main' }}
type=semver,pattern={{version}}${{ matrix.variant == 'full' && '-full' || '' }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
type=raw,value=latest${{ matrix.variant == 'full' && '-full' || '' }},enable=${{ startsWith(github.ref, 'refs/tags/') }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
@@ -40,3 +44,6 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
build-args: |
INSTALL_EXT=${{ matrix.variant == 'full' && 'true' || 'false' }}

View File

@@ -1,4 +1,4 @@
FROM python:3.12-slim-bookworm AS base
FROM python:3.13-slim-bookworm AS base
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
@@ -12,6 +12,21 @@ RUN npm install -g pnpm
ARG REQUEST_TIMEOUT=60000
ENV REQUEST_TIMEOUT=$REQUEST_TIMEOUT
ENV PNPM_HOME=/usr/local/share/pnpm
ENV PATH=$PNPM_HOME:$PATH
RUN mkdir -p $PNPM_HOME && \
pnpm add -g @amap/amap-maps-mcp-server @playwright/mcp@latest tavily-mcp@latest @modelcontextprotocol/server-github @modelcontextprotocol/server-slack
ARG INSTALL_EXT=false
RUN if [ "$INSTALL_EXT" = "true" ]; then \
ARCH=$(uname -m); \
if [ "$ARCH" = "x86_64" ]; then \
npx -y playwright install --with-deps chrome; \
else \
echo "Skipping Chrome installation on non-amd64 architecture: $ARCH"; \
fi; \
fi
RUN uv tool install mcp-server-fetch
ENV UV_PYTHON_INSTALL_MIRROR="http://mirrors.aliyun.com/pypi/simple/"
@@ -20,8 +35,6 @@ WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install
RUN pnpm install @amap/amap-maps-mcp-server @playwright/mcp@latest tavily-mcp@latest @modelcontextprotocol/server-github @modelcontextprotocol/server-slack
COPY . .
RUN pnpm frontend:build && pnpm build