#!/bin/bash # Deploy script for ImageDrop demo # Copies the built files to a project's public folder # Configuration - set PROJECT_PUBLIC_DIR or pass as argument PROJECT_PUBLIC_DIR="${1:-$PROJECT_PUBLIC_DIR}" if [ -z "$PROJECT_PUBLIC_DIR" ]; then echo "Usage: ./deploy.sh " echo " or: PROJECT_PUBLIC_DIR=/path/to/project/public ./deploy.sh" echo "" echo "Example:" echo " ./deploy.sh /data/daas/data/projects/my-project/public" echo "" echo "This will copy the built files from ./dist to the specified directory." exit 1 fi # Check if dist folder exists if [ ! -d "dist" ]; then echo "Error: dist folder not found. Run 'npm run build' first." exit 1 fi # Create target directory if it doesn't exist mkdir -p "$PROJECT_PUBLIC_DIR" # Copy files echo "Deploying to: $PROJECT_PUBLIC_DIR" cp -r dist/* "$PROJECT_PUBLIC_DIR/" echo "Deployment complete!" echo "" echo "Files deployed:" ls -la "$PROJECT_PUBLIC_DIR/" echo "" echo "The demo is now accessible at your project's domain." echo "Routes: /#/, /#/login, /#/register, /#/dashboard"