| Dịch Vụ | Công Nghệ | Runtime | Mục Đích |
|---|---|---|---|
| Tool | Laravel (PHP) | PHP-FPM + Nginx | Công cụ tự động hoá marketing |
| Thành Phần | Dịch Vụ AWS | Mục Đích |
|---|---|---|
| Container Images | AWS ECR | Registry Docker image riêng tư |
| Cơ sở dữ liệu | AWS RDS | MySQL cho Laravel |
| Cache | ElastiCache | Redis cho session, queue, cache driver |
tools/marketing-tool-prodtool/build/source/Marketing/tool/
├─ build/
│ ├─ Dockerfile-base.production # Base image: FPM + Nginx + CLI
│ ├─ Dockerfile-production # Production: multi-stage Laravel build
│ ├─ source/ # ⚡ Git submodule — Laravel source
│ │ ├─ composer.json / package.json
│ │ ├─ artisan
│ │ └─ ...
│ ├─ conf/
│ │ ├─ nginx/template/default.conf.template
│ │ └─ supervisor/marketing-tool.conf
│ └─ data/php/
│ ├─ php.ini
│ └─ php-fpm.conf
├─ database/
└─ docker-compose.yml.production┌──────────────────────────────────────────────────────────────────────────┐
│ MULTI-STAGE BUILD PIPELINE │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ GIAI ĐOẠN 1 │ │ GIAI ĐOẠN 2 │ │ GIAI ĐOẠN 3 │ │
│ │ vendor │───▶│ node_base │───▶│ build │ │
│ │ • composer │ │ • npm │ │ • npm run │ │
│ │ install │ │ install │ │ build │ │
│ └─────────────┘ └─────────────┘ └──────┬──────┘ │
│ ┌──────────────────────┬────┴───────────────┐ │
│ ▼ ▼ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ cli │ │ fpm_server │ │ web_server │ │
│ │ • Artisan │ │ • PHP-FPM │ │ • Nginx │ │
│ │ • Queues │ │ • Supervisor│ │ • Static │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└──────────────────────────────────────────────────────────────────────────┘build/source/.env).env không bao giờ nhúng vào image — mount read-only khi runtime