Local Development
Run Lua on your local machine for development purposes.
Requirements
- PHP 8.1 or later
- Composer
- Node.js with npm
- MySQL
If you prefer working with Docker instead of installing PHP and MySQL locally, you can use Laravel Sail.
Installation
1. Clone the repository
git clone https://github.com/luadotsh/lua.git
cd lua
2. Install dependencies
Choose one of the following methods:
Option 1: Without Sail (Local PHP Installation)
composer install
Option 2: With Sail (Docker)
docker run --rm \
-u "$(id -u):$(id -g)" \
-v $(pwd):/var/www/html \
-w /var/www/html \
laravelsail/php82-composer:latest \
composer install --ignore-platform-reqs
Then, start the project:
vendor/bin/sail up -d
3. Set up environment variables
cp .env.example .env
Update your .env
file with database and app settings.
4. Run migrations and seed the database
php artisan migrate:fresh --seed
🛠️ Using Sail?
If you're running Laravel with Sail, prefix commands withsail
, like this:vendor/bin/sail artisan migrate:fresh --seed
5. Run the front-end build
npm install
npm run dev
6. Running with Reverb
php artisan reverb:start --host="0.0.0.0" --port=8080 --hostname="lua.sh.test"
Using Sail? Run:
vendor/bin/sail artisan reverb:start --host="0.0.0.0" --port=8080 --hostname="lua.sh.test"
Summary of Running Commands with Sail
Once Sail is running (vendor/bin/sail up -d
), use it for all Laravel commands:
vendor/bin/sail artisan {command}
This guide ensures a clear, easy-to-follow installation process for both traditional local setups and Docker-based Laravel Sail environments. 🚀