Docker Deployment
GolemBot can be deployed as a Docker container for long-running gateway services.
Dockerfile
The project ships a Dockerfile:
dockerfile
FROM node:22-slim
RUN npm install -g golembot
WORKDIR /assistant
COPY . .
RUN if [ -f package.json ]; then npm install --omit=dev; fi
EXPOSE 3000
CMD ["golembot", "gateway"]Build & Run
From your assistant directory (where golem.yaml lives):
bash
docker build -t my-bot .
docker run -d \
--name my-bot \
-p 3000:3000 \
-e ANTHROPIC_API_KEY=sk-ant-xxx \
-e FEISHU_APP_ID=cli_xxx \
-e FEISHU_APP_SECRET=xxx \
-e GOLEM_TOKEN=my-secret \
my-botDocker Compose
Create a docker-compose.yml alongside your assistant directory:
yaml
services:
golembot:
build: .
ports:
- "3000:3000"
env_file:
- .env
restart: unless-stoppedThen:
bash
docker compose up -dNotes
- The Coding Agent CLI (e.g.,
claude) must be available inside the container. The basenode:22-slimimage does not include it — you may need to add an install step for your chosen engine. - Environment variables containing API keys and channel credentials should be passed via
-eflags orenv_file, not baked into the image. - WeCom requires the container to be reachable via a public URL for webhook callbacks. Feishu and DingTalk use outbound WebSocket connections and work behind NAT.
- The
EXPOSE 3000matches the default gateway port. Override with-e GOLEM_PORT=<port>if needed.