31 lines
No EOL
1.1 KiB
Bash
Executable file
31 lines
No EOL
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Environment-agnostic build script
|
|
# The app now detects its base path at runtime from config.json
|
|
|
|
# Clean any previous build
|
|
rm -rf build
|
|
|
|
echo "Building application with dynamic base path support..."
|
|
echo "The app will detect its base path at runtime from config.json"
|
|
|
|
# Build without hardcoded paths
|
|
npm run build
|
|
|
|
echo ""
|
|
echo "✅ Build complete! The 'build' directory contains files ready for deployment."
|
|
echo ""
|
|
echo "📝 DEPLOYMENT INSTRUCTIONS:"
|
|
echo "1. Copy build files to your web server at any path:"
|
|
echo " Example: scp -r build/* user@server:/var/www/html/your-app-path/"
|
|
echo ""
|
|
echo "2. Update config.json on your server:"
|
|
echo " - Set 'basePath' to match your deployment path (e.g., '/video_query')"
|
|
echo " - Set 'domain' to your server's domain"
|
|
echo " - Update MSAL and API endpoints as needed"
|
|
echo ""
|
|
echo "3. The app will automatically use the correct paths at runtime!"
|
|
echo ""
|
|
echo "📋 Example config.json for different deployments:"
|
|
echo " Subdirectory: {\"basePath\": \"/video_query\", \"domain\": \"https://myserver.com\"}"
|
|
echo " Root deploy: {\"basePath\": \"\", \"domain\": \"https://video-app.com\"}" |