Files
copilotkit__copilotkit/examples/slack/Dockerfile.bot
Tyler Slaton e2e403dc99 feat(examples/slack): Dockerfiles for the runtime and bot services
Encode the deployment recipe in the repo instead of platform config:
digest-pinned node:22.16.0-slim base, pinned pnpm via packageManager,
frozen-lockfile install, and (bot image only) Playwright Chromium with
its system libraries — browsers install inside node_modules
(PLAYWRIGHT_BROWSERS_PATH=0) so they ship with the app layer, the two
gaps that broke chart rendering on Railpack-style builders.

Verified locally per docker-ci-safety: both images build clean;
chromium.launch() succeeds in the built bot image; the runtime image
boots to listening. README gains a Deploying section (process table,
env vars, Railway notes).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 10:35:24 -07:00

23 lines
955 B
Docker

# Slack ingress bot (app/index.ts): Socket Mode, JSX -> Block Kit, and the
# chart/diagram renderer, which drives Playwright Chromium. The browser is
# installed INSIDE node_modules (PLAYWRIGHT_BROWSERS_PATH=0) so it ships with
# the app layer, and `install --with-deps` bakes Chromium's system libraries
# into this image — the two failure modes of platform builders, eliminated.
FROM node:22.16.0-slim@sha256:048ed02c5fd52e86fda6fbd2f6a76cf0d4492fd6c6fee9e2c463ed5108da0e34
WORKDIR /app
ENV CI=true \
PLAYWRIGHT_BROWSERS_PATH=0
RUN corepack enable && corepack prepare pnpm@10.13.1 --activate
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
# Uses the lockfile-resolved playwright version — no version drift possible.
RUN npx playwright install --with-deps chromium
COPY . .
# Socket Mode is outbound-only: no ports exposed. Needs SLACK_BOT_TOKEN,
# SLACK_APP_TOKEN, AGENT_URL in the environment.
CMD ["pnpm", "start"]