#!/bin/bash # entrypoint.sh # This script is executed when the container starts. # It runs both the PHP artisan server and the Node.js Vite server. echo "Starting development servers..." # Run NPM install just in case new packages were added echo "Running npm install..." npm install # Run composer install just in case echo "Running composer install..." composer install # Run the Vite development server in the background # The '&' symbol sends the process to the background echo "Starting Vite dev server (npm run dev)..." npm run dev & # Start the Laravel development server in the foreground # The --host=0.0.0.0 is crucial to make it accessible from outside the container echo "Starting Laravel dev server (php artisan serve)..." php artisan serve --host=0.0.0.0 --port=8000