Skip to content

Commit 9f2f824

Browse files
authored
feat(supabase):支持云部署 (#387)
1 parent b4131f0 commit 9f2f824

5 files changed

Lines changed: 58 additions & 180 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.git
2+
.venv
3+
__pycache__
4+
*.pyc
5+
.pytest_cache
6+
.mypy_cache
7+
.ruff_cache
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
FROM python:3.10.18-bookworm AS builder
2+
3+
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
4+
PIP_NO_CACHE_DIR=1 \
5+
PYTHONDONTWRITEBYTECODE=1 \
6+
PYTHONUNBUFFERED=1 \
7+
PATH="/app/.venv/bin:$PATH"
8+
9+
WORKDIR /app
10+
11+
RUN python -m venv /app/.venv \
12+
&& /app/.venv/bin/pip install uv==0.7.5
13+
14+
COPY pyproject.toml uv.lock README.md ./
15+
COPY src ./src
16+
17+
RUN uv export --frozen --no-dev --no-editable --no-emit-project --output-file requirements.txt \
18+
&& sed -i 's#git+https://github.com/volcengine/volcengine-python-sdk.git@b2a1b9d08e9906c60d25c25f0baaf81347f9985b#https://github.com/volcengine/volcengine-python-sdk/archive/b2a1b9d08e9906c60d25c25f0baaf81347f9985b.zip#' requirements.txt \
19+
&& uv pip install --python /app/.venv/bin/python --requirement requirements.txt \
20+
&& uv pip install --python /app/.venv/bin/python --no-deps .
21+
22+
FROM python:3.10.18-bookworm AS runtime
23+
24+
ENV PYTHONDONTWRITEBYTECODE=1 \
25+
PYTHONUNBUFFERED=1 \
26+
PATH="/app/.venv/bin:$PATH"
27+
28+
WORKDIR /app
29+
30+
RUN useradd --create-home --home-dir /home/appuser --uid 10001 appuser
31+
32+
COPY --from=builder --chown=10001:10001 /app/.venv /app/.venv
33+
34+
USER 10001:10001
35+
36+
EXPOSE 8000
37+
38+
ENTRYPOINT ["mcp-server-supabase"]
39+
CMD ["--transport", "streamable-http"]

server/mcp_server_supabase/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ authors = [
99
{ name = "Volcengine", email = "support@volcengine.com" }
1010
]
1111
dependencies = [
12-
"mcp>=1.1.2",
12+
"mcp==1.12.2",
1313
"httpx>=0.27.0",
14-
"pydantic>=2.0.0",
15-
"volcengine-python-sdk @ git+https://github.com/sjcsjcsjc/volcengine-python-sdk.git",
14+
"pydantic>=2.8.0,<3.0.0",
15+
"volcengine-python-sdk @ git+https://github.com/volcengine/volcengine-python-sdk.git@master",
1616
]
1717

1818
[project.optional-dependencies]

server/mcp_server_supabase/src/mcp_server_supabase/platform/aidap_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
StopWorkspaceRequest,
3232
)
3333
except ImportError:
34-
logger.error("volcengine-python-sdk not installed")
34+
logger.error("volcenginesdkaidap client dependencies not installed")
3535
raise
3636

3737

0 commit comments

Comments
 (0)