� Hướng dẫn cài đặt CityResQ360
Hướng dẫn nhanh để cài đặt và chạy hệ thống CityResQ360 trên máy local
� Yêu cầu hệ thống
Nếu dùng Docker (Khuyến nghị ⭐)
| Công nghệ | Phiên bản | Ghi chú |
|---|---|---|
| Docker | 20.10+ | Tải tại đây |
| Docker Compose | 2.0+ | Đi kèm với Docker Desktop |
| Git | 2.30+ | Tải tại đây |
💡 Lưu ý: Khi dùng Docker, bạn KHÔNG CẦN cài PHP, Node.js, Python, Go, MySQL, PostgreSQL... Tất cả đã có sẵn trong containers!
Nếu KHÔNG dùng Docker
Xem hướng dẫn chi tiết tại: docs/BUILD_WITHOUT_DOCKER.md
| Công nghệ | Phiên bản | Mục đích |
|---|---|---|
| PHP | 8.2+ | Laravel Core API |
| Node.js | 20.0+ | Microservices & Mobile App |
| Python | 3.10+ | AI/ML Services |
| Go | 1.21+ | High-performance services |
| Composer | 2.0+ | PHP package manager |
| npm/yarn | Latest | Node.js package manager |
⚡ Cài đặt nhanh
🚀 Cài đặt nhanh với Docker
Yêu cầu: Docker, Docker Compose, Git
Cách 1: Dùng script tự động (Khuyến nghị)
Linux/macOS:
# 1. Clone repository
git clone https://github.com/MNM-DTU-DZ/CityResQ360-DTUDZ.git
cd CityResQ360-DTUDZ
# 2. Chạy script quản lý
chmod +x scripts/local/run.sh
./scripts/local/run.sh
# Menu sẽ hiện:
# 1) Start all services - Khởi động tất cả
# 2) Stop all services - Dừng tất cả
# 3) Restart all services - Khởi động lại
# 4) Clean rebuild - Xóa và build lại từ đầu
# 5) View logs - Xem logs
# 6) Check status - Kiểm tra trạng thái
# 7) Run migrations - Chạy database migrations
# 8) Test endpoints - Test API endpoints
Windows:
Cách 1 - Git Bash (Khuyến nghị):
# 1. Clone repository
git clone https://github.com/MNM-DTU-DZ/CityResQ360-DTUDZ.git
cd CityResQ360-DTUDZ
# 2. Right-click trong folder → "Git Bash Here"
# 3. Fix line endings nếu cần
sed -i 's/\r$//' scripts/local/run.sh
# 4. Chạy script
chmod +x scripts/local/run.sh
./scripts/local/run.sh
Cách 2 - PowerShell/CMD:
# 1. Clone repository
git clone https://github.com/MNM-DTU-DZ/CityResQ360-DTUDZ.git
cd CityResQ360-DTUDZ
# 2. Chạy Docker Compose trực tiếp
cd infrastructure/docker
docker compose up -d
# 3. Chạy migrations
docker exec -it cityresq-coreapi php artisan migrate --seed
docker exec -it cityresq-coreapi php artisan key:generate
docker exec -it cityresq-coreapi php artisan config:cache