Files
telegram-management-system/marketing-agent/frontend/Dockerfile
你的用户名 237c7802e5
Some checks failed
Deploy / deploy (push) Has been cancelled
Initial commit: Telegram Management System
Full-stack web application for Telegram management
- Frontend: Vue 3 + Vben Admin
- Backend: NestJS
- Features: User management, group broadcast, statistics

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-04 15:37:50 +08:00

47 lines
990 B
Docker

# Build stage
FROM node:18-alpine AS builder
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install dependencies
RUN npm ci
# Copy source code
COPY . .
# Build the application with production environment
ARG VITE_API_URL=/api
ARG VITE_ENVIRONMENT=production
RUN npm run build
# Production stage
FROM nginx:alpine
# Install dumb-init for proper signal handling
RUN apk add --no-cache dumb-init
# Copy built files from builder
COPY --from=builder /app/dist /usr/share/nginx/html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/conf.d/default.conf
# Create cache directory for nginx
RUN mkdir -p /var/cache/nginx && \
chown -R nginx:nginx /var/cache/nginx
# Expose port
EXPOSE 80
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=10s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost/health || exit 1
# Use dumb-init to handle signals
ENTRYPOINT ["dumb-init", "--"]
# Start nginx
CMD ["nginx", "-g", "daemon off;"]