Files
Memoh/Dockerfile.agent
T
zenhouke d45487433c feat: add Docker Compose deployment support (#38)
- Add Docker Compose configuration for one-click deployment
- Add Dockerfiles for server, agent, and web services
- Add deployment script (deploy.sh) with automatic setup
- Add comprehensive deployment documentation (DEPLOYMENT.md)
- Use host Docker socket instead of DinD for better performance
- Add Nginx configuration for web frontend
- Add Makefile for common operations
- Update README with Docker deployment quick start

Features:
- One-command deployment with ./deploy.sh
- Automatic JWT secret generation
- Health checks for all services
- Data persistence with Docker volumes
- Support for Bot container management via host Docker
- Production-ready configuration examples

Co-authored-by: root <root@DESKTOP-OU6H3GS.localdomain>
2026-02-11 22:58:05 +08:00

29 lines
588 B
Docker

FROM oven/bun:1 AS builder
WORKDIR /build
COPY agent/package.json agent/bun.lock* ./
RUN bun install
COPY agent/ ./
RUN bun run build
FROM oven/bun:1-alpine
WORKDIR /app
RUN apk add --no-cache ca-certificates wget
COPY --from=builder /build/dist /app/dist
COPY --from=builder /build/node_modules /app/node_modules
COPY --from=builder /build/package.json /app/package.json
EXPOSE 8081
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:8081/health || exit 1
CMD ["bun", "run", "dist/index.js"]