- Added Docker support (Dockerfiles, docker-compose.yml) - Fixed authentication and authorization (token storage, CORS, permissions) - Fixed API response transformations for all modules - Added production deployment scripts and guides - Fixed frontend permission checks and module access - Added database seeding script for production - Complete documentation for deployment and configuration Co-authored-by: Cursor <cursoragent@cursor.com>
88 lines
1.7 KiB
Markdown
88 lines
1.7 KiB
Markdown
# ⚡ Quick Reference - Z.CRM Deployment
|
|
|
|
## 🎯 What Port for Nginx Proxy Manager?
|
|
|
|
### **PORT 3000** ✅
|
|
|
|
Configure Nginx Proxy Manager to forward:
|
|
- **Domain:** `zerp.atmata-group.com`
|
|
- **Forward to:** `localhost:3000` (or `37.60.249.71:3000`)
|
|
- **Enable SSL:** Yes (Let's Encrypt)
|
|
|
|
That's it! The frontend automatically handles API routing.
|
|
|
|
---
|
|
|
|
## 📊 Service Ports
|
|
|
|
| Service | Port | Purpose |
|
|
|---------|------|---------|
|
|
| Frontend | **3000** | Main application (point domain here) |
|
|
| Backend | 5001 | API (accessed through frontend) |
|
|
| Database | 5432 | PostgreSQL (internal only) |
|
|
|
|
---
|
|
|
|
## 🔐 First Time Setup
|
|
|
|
```bash
|
|
# 1. SSH to server
|
|
ssh root@37.60.249.71
|
|
|
|
# 2. Update environment variables
|
|
nano /opt/zerp/.env
|
|
|
|
# 3. Restart services
|
|
cd /opt/zerp && docker-compose restart
|
|
|
|
# 4. Seed database (optional)
|
|
docker-compose exec backend npx prisma db seed
|
|
```
|
|
|
|
---
|
|
|
|
## 🚀 Common Commands
|
|
|
|
```bash
|
|
# View logs
|
|
docker-compose logs -f
|
|
|
|
# Restart services
|
|
docker-compose restart
|
|
|
|
# Stop services
|
|
docker-compose down
|
|
|
|
# Start services
|
|
docker-compose up -d
|
|
|
|
# Check status
|
|
docker-compose ps
|
|
```
|
|
|
|
---
|
|
|
|
## 🌐 Access URLs
|
|
|
|
- **Application:** https://zerp.atmata-group.com (after Nginx config)
|
|
- **Direct Frontend:** http://37.60.249.71:3000
|
|
- **Direct Backend:** http://37.60.249.71:5001
|
|
|
|
---
|
|
|
|
## ⚠️ Important Files
|
|
|
|
- `/opt/zerp/.env` - Environment variables (UPDATE PASSWORDS!)
|
|
- `/opt/zerp/docker-compose.yml` - Docker configuration
|
|
- `/opt/zerp/DEPLOYMENT_SUCCESS.md` - Full documentation
|
|
|
|
---
|
|
|
|
## 📞 Support
|
|
|
|
All services are running and ready!
|
|
|
|
For detailed instructions, see:
|
|
- `DEPLOYMENT_SUCCESS.md` - Complete guide
|
|
- `DEPLOYMENT_GUIDE.md` - Deployment details
|