Deployment
Hướng dẫn deploy frontend và backend
Frontend (Cloudflare Pages)
# Build
cd frontend && npm run build
# Deploy
npx wrangler pages deploy frontend/dist \
--project-name du-va-deu \
--branch master \
--commit-dirty=trueCustom Domains
| URL | Ngôn ngữ |
|---|---|
du-va-deu.pages.dev | Default (Cloudflare) |
dudeu.dahodo.com | 🇻🇳 Tiếng Việt |
steadii.dahodo.com | 🇬🇧 Tiếng Anh |
Backend (VPS)
ssh user@your-vps
cd /path/to/steadii/backend
git pull && npm install
pm2 restart steadii-apiNginx Config
location /steadii/ {
proxy_pass http://127.0.0.1:3100;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}Kiểm tra sau deploy
- Frontend: Mở
dudeu.dahodo.com→ Dashboard load OK - Backend:
curl https://api.dahodo.com/steadii/health→{"status":"ok"} - Sync: Đăng nhập Google → check trạng thái xanh