Files
zerp/update-after-nginx.sh
Talal Sharabi f31d71ff5a Production deployment with Docker and full system fixes
- 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>
2026-02-11 11:25:20 +04:00

28 lines
698 B
Bash
Executable File

#!/bin/bash
# Run this script AFTER configuring Nginx Proxy Manager
# This updates the frontend to use the domain URL for API calls
set -e
echo "🔄 Updating frontend configuration to use domain..."
ssh root@37.60.249.71 << 'ENDSSH'
cd /opt/zerp
# Update docker-compose.yml to use domain
sed -i 's|NEXT_PUBLIC_API_URL:.*|NEXT_PUBLIC_API_URL: https://zerp.atmata-group.com/api/v1|' docker-compose.yml
# Rebuild frontend with new config
docker-compose stop frontend
docker-compose rm -f frontend
docker-compose up -d --build frontend
echo ""
echo "✅ Frontend updated to use domain URL!"
echo ""
echo "Test the system at: https://zerp.atmata-group.com/"
ENDSSH
echo "🎉 Update complete!"