- Frontend: rewrite Home.vue to match backend POST /jobs API (remove single-stage options) - Frontend: add Monitor page (/monitor) for queue and job monitoring - Frontend: add job history with localStorage tracking (per-browser) - Frontend: fix Nginx proxy rewrite (/api -> /) and add 500MB upload limit - Backend: add MinIO storage support (STORAGE_BACKEND=minio) alongside local mode - Backend: add GET /queues/stats API for queue monitoring - Backend: fix download handler for MinIO (buffer mode for Node 18 compat) - Workers: add S3/MinIO download/upload in consumer.py with isolated temp dirs - Workers: add s3_storage.py helper with lifecycle rule (7-day TTL) - Docker: add docker-compose.yml with all services (web, scheduler, redis, workers) - Docker: ports mapped to 9500 (web) and 9501 (scheduler) - Config: add .env to .gitignore to protect secrets Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
38 lines
647 B
Docker
38 lines
647 B
Docker
# 構建階段
|
|
FROM node:18-alpine as build
|
|
|
|
WORKDIR /app
|
|
|
|
# 複製package文件
|
|
COPY package*.json ./
|
|
|
|
# 安裝依賴
|
|
RUN npm ci
|
|
|
|
# 複製源代碼
|
|
COPY . .
|
|
|
|
# 構建應用
|
|
RUN npm run build
|
|
|
|
# 生產階段
|
|
FROM nginx:alpine
|
|
|
|
RUN apk add --no-cache curl
|
|
|
|
# 複製構建結果
|
|
COPY --from=build /app/dist /usr/share/nginx/html
|
|
|
|
# 複製nginx配置
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
# 暴露端口
|
|
EXPOSE 3000
|
|
|
|
# 健康檢查
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
|
|
CMD curl -f http://localhost:3000 || exit 1
|
|
|
|
# 啟動nginx
|
|
CMD ["nginx", "-g", "daemon off;"]
|