Files
Memoh/Dockerfile.web
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

34 lines
696 B
Docker

FROM node:25-alpine AS builder
WORKDIR /build
RUN npm install -g pnpm@10
COPY package.json pnpm-workspace.yaml pnpm-lock.yaml ./
COPY packages ./packages
RUN pnpm install
ARG VITE_API_URL=http://localhost:8080
ARG VITE_AGENT_URL=http://localhost:8081
ENV VITE_API_URL=$VITE_API_URL
ENV VITE_AGENT_URL=$VITE_AGENT_URL
WORKDIR /build/packages/web
RUN pnpm build
FROM nginx:alpine
COPY --from=builder /build/packages/web/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost/ || exit 1
CMD ["nginx", "-g", "daemon off;"]