File size: 1,311 Bytes
			
			| ead5909 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #!/bin/bash
# LMDpro Production Deployment Script
# This script automates the deployment process
set -e
echo "π Starting LMDpro deployment..."
# Check if .env.production exists
if [ ! -f ".env.production" ]; then
    echo "β Error: .env.production file not found!"
    echo "Please create .env.production with your production environment variables."
    exit 1
fi
# Install dependencies
echo "π¦ Installing dependencies..."
npm ci --only=production
# Type check
echo "π Running type checks..."
npm run typecheck
# Build the application
echo "ποΈ  Building application..."
npm run build
# Test the build
echo "π§ͺ Testing production build..."
npm run start &
BUILD_PID=$!
sleep 10
# Check if the server is running
if curl -f http://localhost:3000 >/dev/null 2>&1; then
    echo "β
 Production build test successful!"
    kill $BUILD_PID
else
    echo "β Production build test failed!"
    kill $BUILD_PID
    exit 1
fi
echo "π Deployment preparation complete!"
echo "π Next steps:"
echo "1. Upload the .next folder and other files to your hosting provider"
echo "2. Set up environment variables on your hosting platform"
echo "3. Configure your custom domain DNS settings"
echo "4. Start the production server with 'npm start'"
 | 
