#!/bin/sh # Exit script on any error set -e # To Ensure we're in the right directory cd /var/www/html # Install dependencies echo "Installing Composer dependencies..." composer install --no-dev --optimize-autoloader # Set correct permissions for storage and cache echo "Setting correct permissions for storage and cache..." chown -R www-data:www-data storage bootstrap/cache chmod -R 775 storage bootstrap/ # Run migrations echo "Running migrations..." php artisan migrate --force # Start PHP-FPM echo "Starting PHP-FPM..." php-fpm