forked from rsdouglas/janee
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
57 lines (42 loc) · 1.55 KB
/
Dockerfile
File metadata and controls
57 lines (42 loc) · 1.55 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Stage 1: Build
FROM node:20-alpine AS builder
WORKDIR /app
# Copy package files first for better layer caching
COPY package.json package-lock.json* ./
COPY packages/openclaw-plugin/package.json ./packages/openclaw-plugin/
# Install all dependencies (including devDependencies for build)
RUN rm -f package-lock.json && npm install
# Copy source code and workspace packages
COPY tsconfig.json ./
COPY src/ ./src/
COPY packages/ ./packages/
COPY SKILL.md ./
# Build TypeScript (main + workspaces)
RUN npm run build
# Stage 2: Production
FROM node:20-alpine AS production
WORKDIR /app
# Copy package files
COPY package.json package-lock.json* ./
COPY packages/openclaw-plugin/package.json ./packages/openclaw-plugin/
# Install only production dependencies
RUN rm -f package-lock.json && npm install --omit=dev && npm cache clean --force
# Copy built files from builder
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/packages/openclaw-plugin/dist ./packages/openclaw-plugin/dist
COPY SKILL.md ./
COPY scripts/ ./scripts/
# Create config and data directories
RUN mkdir -p /root/.janee /data
# Default config directory
ENV JANEE_CONFIG_DIR=/root/.janee
ENV NODE_ENV=production
# Expose HTTP transport port
EXPOSE 3000
# Health check for HTTP mode
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD wget -qO- http://localhost:3000/health 2>/dev/null || exit 0
# Default: start MCP server in stdio mode
# Override with --transport http --port 3000 for HTTP mode
ENTRYPOINT ["node", "dist/cli/index.js", "serve"]
CMD ["--transport", "stdio"]