| Dịch Vụ | Công Nghệ | Runtime | Mục Đích |
|---|---|---|---|
| Admin | Vue.js (Vite + TypeScript) | Nginx (static) | Dashboard quản trị traffic |
| API | Golang | Go binary + Supervisor | API backend xử lý traffic |
| Tool-v2 | Bun (TypeScript) | Bun + Supervisor + Chrome | Công cụ tự động giả lập traffic |
npm install → npm run build:prodtraffic/admin-prodadmin/build/admin/Traffic/admin/
├─ build/
│ ├─ Dockerfile.production # Production: Vue.js build → Nginx
│ ├─ admin/ # ⚡ Git submodule — Vue.js source
│ └─ conf/nginx/
│ ├─ common/nginx.conf
│ └─ default.conf
├─ .env.production
└─ docker-compose.yml.productiongo mod download → go build -o tf-api cmd/main.gotraffic/api-prodapi/build/api/Traffic/api/
├─ build/
│ ├─ Dockerfile-base # Base image: Supervisor
│ ├─ Dockerfile # Production: Go build → binary
│ ├─ api/ # ⚡ Git submodule — Go source
│ │ ├─ go.mod / go.sum
│ │ ├─ cmd/main.go
│ │ └─ ...
│ └─ conf/supervisor/traffic-api.conf
├─ database/
└─ docker-compose.yml.production┌─────────────────────────────────────────────────────────────┐
│ PIPELINE BUILD GO │
│ │
│ ┌─────────────┐ ┌─────────────┐ │
│ │ GIAI ĐOẠN 1 │ │ GIAI ĐOẠN 2 │ │
│ │ build │───────────▶│ production │ │
│ │ │ │ │ │
│ │ • go mod │ │ • Base │ │
│ │ download │ │ image │ │
│ │ • go build │ │ • Supervisor│ │
│ │ • tf-api │ │ • tf-api │ │
│ │ binary │ │ binary │ │
│ └─────────────┘ └─────────────┘ │
└─────────────────────────────────────────────────────────────┘bun install → bun compiletraffic/tool-prodtool-v2/build/tools/Traffic/tool-v2/
├─ build/
│ ├─ Dockerfile-base # Base image: Supervisor + Chrome
│ ├─ Dockerfile # Production image
│ ├─ tools/ # ⚡ Git submodule — Bun source
│ │ ├─ package.json / bun.lock
│ │ └─ src/
│ └─ conf/supervisor/traffic-tool.conf
├─ .env.production
└─ docker-compose.yml.production| Công Cụ | Phiên Bản Tối Thiểu | Mục Đích |
|---|---|---|
| Docker | ≥ 24.0.0 | Quản lý container |
| Google Chrome Stable | ≥ 130.0.0 | Chrome headless cho tự động hoá |
.env không bao giờ nhúng vào image — mount dưới dạng read-only volume khi runtime