Assist_Design/scripts/plesk-deploy.sh
tema 9c796f59da Enhance Freebit integration and improve error handling
- Added FreebitMapperService to facilitate account normalization and improve code organization.
- Updated FreebitAuthService to streamline error handling and response parsing, replacing custom exceptions with standard error messages.
- Enhanced FreebitClientService to ensure proper URL construction and improved logging for API errors.
- Refactored FreebitOperationsService to include new request types and validation, ensuring better handling of SIM operations.
- Updated FreebitOrchestratorService to utilize the new mapper for account normalization across various methods.
- Improved SIM management features in the portal, including better handling of SIM details and usage information.
- Refactored components to enhance user experience and maintainability, including updates to the ChangePlanModal and SimActions components.
2025-11-21 18:41:14 +09:00

55 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# 🐳 Plesk Docker Deployment Script
# Updated for organized Docker structure
set -e
# Configuration
REPO_PATH="/var/www/vhosts/yourdomain.com/git/customer-portal"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
NC='\033[0m'
log() { echo -e "${GREEN}[PLESK] $1${NC}"; }
warn() { echo -e "${YELLOW}[PLESK] WARNING: $1${NC}"; }
error() { echo -e "${RED}[PLESK] ERROR: $1${NC}"; exit 1; }
# Navigate to repository
cd "$REPO_PATH"
log "🚀 Starting Plesk Docker deployment..."
# Check if Docker is available
if ! command -v docker &> /dev/null; then
error "Docker is not installed. Please install Docker first."
fi
if ! command -v docker-compose &> /dev/null; then
error "Docker Compose is not installed. Please install Docker Compose."
fi
# Check if production environment exists
ENV_FILE=".env"
if [ ! -f "$ENV_FILE" ]; then
log "Creating environment file from template..."
cp .env.production.example .env
warn "Please edit .env with your actual production values!"
error "Production environment not configured. Please set up .env"
fi
# Use the organized production management script
log "Running production deployment script..."
./scripts/prod/manage.sh deploy
log "🎉 Plesk Docker deployment completed!"
log "📝 Don't forget to:"
echo "1. Configure Plesk reverse proxy to point to port 3000"
echo "2. Set up SSL certificates in Plesk"
echo "3. Test your application at your domain"