home
/
u941026986
/
domains
/
paratune.com
/
public_html
➕ New
📤 Upload
✎ Editing:
lazy_ass.sh
← Back
#!/bin/bash # Paratune Technologies - Lazy Deployment Script # Auto-runs after git push to server # Don't exit on error - we want to report all step statuses set +e echo "๐ Starting deployment..." echo "================================" # Colors for output GREEN='\033[0;32m' YELLOW='\033[1;33m' NC='\033[0m' # No Color # Navigate to the project directory (if needed) # cd /path/to/your/project echo "๐ฅ Pulling latest changes from GitHub..." rm -f bootstrap/cache/routes-v7.php if git pull origin master; then echo -e "${GREEN}โ Code updated${NC}" else echo -e "${YELLOW}โ ๏ธ Git pull completed with warnings or no changes${NC}" fi echo "" echo "๐งน Clearing caches..." if php artisan view:clear && \ php artisan config:clear && \ php artisan cache:clear && \ php artisan route:clear && \ php artisan optimize:clear; then echo -e "${GREEN}โ Caches cleared${NC}" else echo -e "${YELLOW}โ ๏ธ Some cache clearing operations had issues${NC}" fi echo "" # Run database migrations echo "๐พ Running database migrations..." echo " Including migrations:" echo " - 2026_01_24_042457_add_project_id_to_api_keys (Project-scoped API keys)" if php artisan migrate --force 2>&1; then echo -e "${GREEN}โ Migrations completed${NC}" else MIGRATE_EXIT_CODE=$? echo -e "${YELLOW}โ ๏ธ Migrations failed with exit code: ${MIGRATE_EXIT_CODE}${NC}" echo "โ Migration error detected" fi echo "" echo "๐ฑ Running Hiring Permissions Seeder..." if php artisan db:seed --class=HiringPermissionsSeeder 2>&1; then echo -e "${GREEN}โ Hiring Permissions Seeder completed${NC}" else SEEDER_EXIT_CODE=$? echo -e "${YELLOW}โ ๏ธ Seeder completed with warnings or already seeded (exit code: ${SEEDER_EXIT_CODE})${NC}" fi echo "" echo "๐พ Verifying all migrations are applied..." if php artisan migrate --force 2>&1; then echo -e "${GREEN}โ All migrations verified${NC}" else VERIFY_EXIT_CODE=$? echo -e "${YELLOW}โ ๏ธ Migration verification had issues (exit code: ${VERIFY_EXIT_CODE})${NC}" echo "โ Migration verification error detected" fi echo "" # Optimize for production echo "โก Optimizing for production..." if php artisan config:cache && \ php artisan route:cache && \ php artisan view:cache && \ php artisan optimize; then echo -e "${GREEN}โ Optimization complete${NC}" else echo -e "${YELLOW}โ ๏ธ Some optimization steps had issues${NC}" fi echo "" # Set proper permissions (adjust paths if needed) echo "๐ Setting permissions..." chmod -R 775 storage bootstrap/cache 2>/dev/null || echo -e "${YELLOW}โ ๏ธ Permission setting skipped${NC}" echo "" echo "================================" echo -e "${GREEN}๐ Deployment completed successfully!${NC}" echo "Time: $(date '+%Y-%m-%d %H:%M:%S')"
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel