Tài Liệu Xây Dựng & Triển Khai Social Admin — Docker#
Triển Khai Social Admin ở môi trường development với Docker
🔥 Tổng Quan#
Tài liệu này mô tả quy trình xây dựng và triển khai dịch vụ Social Admin chạy trên Docker trong môi trường production.Tech Stack#
Framework: Vue.js xây dựng với Bun (oven/bun:1.3.2)
Xây dựng: bun install → bun run build:dev
Runtime: Nginx Alpine (phục vụ file tĩnh)
Source: Git submodule tại build/admin/
📖 Tài Liệu Tham Khảo#
🚧 Cấu Trúc Dự Án#
Social/admin/
├─ build/
│ ├─ Dockerfile.development # Development build
│ ├─ admin/ # ⚡ Git submodule — Vue.js source
│ │ ├─ .env.development
│ │ ├─ package.json
│ │ └─ src/
│ └─ conf/
│ └─ nginx/
│ ├─ common/nginx.conf # Cấu hình Nginx chung
│ └─ default.conf # Cấu hình server block
├─ .env.development # Biến môi trường development
└─ docker-compose.yml.development # Compose file development
🏗️ Pipeline Xây dựng#
┌──────────────────────────────────────────────────────────────┐
│ BUN + NGINX BUILD PIPELINE │
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ GIAI ĐOẠN 1 │ │ GIAI ĐOẠN 2 │ │ GIAI ĐOẠN 3 │ │
│ │ base │───▶│ build │───▶│ web_server │ │
│ │ │ │ │ │ │ │
│ │ • bun │ │ • bun run │ │ • Nginx │ │
│ │ install │ │ build:dev│ │ Alpine │ │
│ │ │ │ │ │ • File tĩnh │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└──────────────────────────────────────────────────────────────┘
❄️ Cấu Hình#
Biến Môi Trường Docker Compose (.env.development)#
🚀 Xây dựng & Triển Khai#
🛡️ Các Thực Hành Bảo Mật#
1.
Container non-root — chạy dưới user không đặc quyền (UID: 1200)
2.
Nginx hardened — cấu hình tùy chỉnh với security headers
3.
Chỉ file tĩnh — không có server-side code execution
📚 Tài Liệu Liên Quan#
Modified at 2026-03-25 11:54:03