forked from sirkirby/unifi-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (25 loc) · 1.07 KB
/
Copy pathDockerfile
File metadata and controls
34 lines (25 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM python:3.13-slim
WORKDIR /app
# Version passed from CI/CD (used by hatch-vcs when git is unavailable)
ARG VERSION=0.0.0.dev0
ENV SETUPTOOLS_SCM_PRETEND_VERSION=${VERSION}
RUN pip install --upgrade pip \
&& pip install uv
# Copy workspace structure
COPY pyproject.toml uv.lock ./
COPY apps/protect/pyproject.toml apps/protect/pyproject.toml
COPY apps/protect/README.md apps/protect/README.md
COPY packages/unifi-core/pyproject.toml packages/unifi-core/pyproject.toml
COPY packages/unifi-mcp-shared/pyproject.toml packages/unifi-mcp-shared/pyproject.toml
# Copy source trees
COPY apps/protect/src apps/protect/src
COPY packages/unifi-core/src packages/unifi-core/src
COPY packages/unifi-mcp-shared/src packages/unifi-mcp-shared/src
# Install all packages using uv sync (respects lockfile for reproducible builds)
RUN uv sync --frozen --no-dev --package unifi-protect-mcp
# Use the venv Python directly
ENV PATH="/app/.venv/bin:$PATH"
# Expose the MCP server port (for optional HTTP transport: streamable-http or SSE)
EXPOSE 3001
# Console-script entrypoint
CMD ["unifi-protect-mcp"]