-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.dev
More file actions
39 lines (39 loc) · 2.13 KB
/
Copy pathDockerfile.dev
File metadata and controls
39 lines (39 loc) · 2.13 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
35
36
37
38
39
# Dev image used by both the `bot` and `web` services in
# docker-compose.dev.yml. Source is bind-mounted at runtime; we just need a
# node + alpine image with the full dependency tree (including dev deps so
# vitest, vite, and friends are available).
FROM node:22-alpine
WORKDIR /app
# ffmpeg: clip normalizing/joining and dialogue-audio concat, as in prod.
# python3 + uv: comfy-mcp (the ComfyUI bridge the bot spawns) is a Python tool;
# git: comfy-cli imports GitPython, which aborts without the binary.
# socat: docker-compose.dev.yml forwards the container's 127.0.0.1:8188 to the
# host bridge so comfy-cli's local-only tools (validate, set slots) see ComfyUI.
# It is DEV-ONLY — the production image has no ComfyUI provider; see
# docker-compose.dev.yml for how the container reaches a ComfyUI on the host.
RUN apk add --no-cache mongodb-tools curl ffmpeg git socat python3 uv
# Tools live under /opt (not /root) because the container runs as the
# unprivileged `node` user — see below.
ENV UV_TOOL_DIR=/opt/uv/tools
ENV UV_TOOL_BIN_DIR=/usr/local/bin
# System interpreter (no managed Python download). comfy-cli is a separate
# package (comfy-mcp only declares it loosely), and uv links only the top
# package's entry points, so `comfy` is pointed at explicitly via COMFY_BIN.
RUN uv tool install --python /usr/bin/python3 --with 'comfy-cli>=1.22.0' comfy-mcp==0.10.0
ENV COMFY_BIN=/opt/uv/tools/comfy-mcp/bin/comfy
# Run as `node` (uid 1000 = the WSL host user) so the coding-agent providers
# (Claude Code / Codex) write sessions and refreshed logins into the mounted
# host ~/.claude and ~/.codex as the host user, not root. HOST_HOME is the
# host's $HOME: the mounts land at the same absolute path because Claude
# Code's plugin registry stores absolute install paths.
ARG HOST_HOME=/home/node
RUN mkdir -p /data/exports /data/backups "$HOST_HOME" \
&& chown -R node:node /app /data "$HOST_HOME"
USER node
COPY --chown=node:node package.json package-lock.json* ./
RUN npm ci
ENV PDF_EXPORT_DIR=/data/exports
ENV BACKUP_DIR=/data/backups
EXPOSE 3000 3002 3010 5173
# Default command — overridden per-service in compose.
CMD ["node", "--watch", "src/index.js"]