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>
This commit is contained in:
39
server-deploy.sh
Executable file
39
server-deploy.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Z.CRM Server Deployment Script
|
||||
# Run this script ON THE SERVER
|
||||
|
||||
set -e
|
||||
|
||||
echo "🚀 Z.CRM Deployment Starting..."
|
||||
|
||||
# Install Docker if not installed
|
||||
if ! command -v docker &> /dev/null; then
|
||||
echo "📦 Installing Docker..."
|
||||
curl -fsSL https://get.docker.com -o get-docker.sh
|
||||
sh get-docker.sh
|
||||
systemctl enable docker
|
||||
systemctl start docker
|
||||
rm get-docker.sh
|
||||
fi
|
||||
|
||||
# Install Docker Compose if not installed
|
||||
if ! command -v docker-compose &> /dev/null; then
|
||||
echo "📦 Installing Docker Compose..."
|
||||
curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
chmod +x /usr/local/bin/docker-compose
|
||||
fi
|
||||
|
||||
# Create app directory
|
||||
APP_DIR="/opt/zerp"
|
||||
mkdir -p $APP_DIR
|
||||
cd $APP_DIR
|
||||
|
||||
echo "✅ Prerequisites installed"
|
||||
echo ""
|
||||
echo "📋 Next steps:"
|
||||
echo "1. Copy your project files to $APP_DIR"
|
||||
echo "2. Create .env file with production values"
|
||||
echo "3. Run: docker-compose up -d"
|
||||
echo ""
|
||||
echo "🎉 Setup complete!"
|
||||
Reference in New Issue
Block a user