-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathDockerfile.orchestrator
More file actions
52 lines (37 loc) · 1.54 KB
/
Copy pathDockerfile.orchestrator
File metadata and controls
52 lines (37 loc) · 1.54 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
# OpenClaw Managed Agents — orchestrator image
#
# Thin Node service that exposes the managed-agent API and spawns one
# Dockerfile.runtime container per agent.
FROM node:22-slim AS builder
WORKDIR /app
# Install pnpm so the build step matches local dev.
RUN corepack enable && corepack prepare pnpm@9.12.0 --activate
COPY package.json ./
COPY tsconfig.json ./
RUN pnpm install --no-frozen-lockfile
COPY src ./src
RUN pnpm build
FROM node:22-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl tini \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN corepack enable && corepack prepare pnpm@9.12.0 --activate
COPY package.json ./
RUN pnpm install --prod --no-frozen-lockfile && pnpm store prune
COPY --from=builder /app/dist ./dist
# The portal-v2 design ships as a static HTML asset that portal-v2.ts
# reads at startup via readFileSync. package.json's build script
# copies src/orchestrator/portal-v2.html into dist/ during the
# builder stage above; this second COPY just carries that file
# through to the runtime layer along with the rest of dist/.
ENV NODE_ENV=production \
PORT=8080 \
OPENCLAW_DOCKER_NETWORK=openclaw-net \
OPENCLAW_RUNTIME_IMAGE=openclaw-managed-agents/agent:latest \
OPENCLAW_HOST_STATE_ROOT=/var/openclaw/sessions \
OPENCLAW_GATEWAY_PORT=18789
EXPOSE 8080
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s --retries=5 \
CMD curl --silent --fail "http://127.0.0.1:${PORT}/healthz" || exit 1
ENTRYPOINT ["/usr/bin/tini", "--", "node", "dist/index.js"]