Merge pull request #6 from joker-bai/main

增加Docker部署
This commit is contained in:
xiemanR
2026-03-03 16:57:44 +08:00
committed by GitHub
2 changed files with 47 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
# Build stage
FROM node:22-alpine AS builder
WORKDIR /app
COPY . .
RUN npm install && npm run build
# Production stage
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
RUN npm install next --save
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME="0.0.0.0"
CMD ["npm", "start"]
+20
View File
@@ -69,6 +69,26 @@ By default, the dashboard reads config from `~/.openclaw/openclaw.json`. To use
OPENCLAW_HOME=/opt/openclaw npm run dev
```
## Docker Deployment
You can also deploy the dashboard using Docker:
### Build Docker Image
```bash
docker build -t openclaw-dashboard .
```
### Run Container
```bash
# Basic run
docker run -d -p 3000:3000 openclaw-dashboard
# With custom OpenClaw config path
docker run -d --name openclaw-dashboard -p 3000:3000 -e OPENCLAW_HOME=/opt/openclaw -v /path/to/openclaw:/opt/openclaw openclaw-dashboard
```
---
# OpenClaw Bot Dashboard(中文)