Setting up the development environment with Sail
Latarips
If youโre looking to configure a cloned project for development using Sail, follow these straightforward steps:
๐ Environment setup
๐ณ Needed tools
- Install Docker
- Clone this project:
git clone [REPO_URL] my-app
- Move to the project folder:
my-app
๐ ๏ธ Environment configuration
- Copy the default environment variables:
cp .env.example .env
๐ Application execution
- Install PHP dependencies and bring up the project Docker container
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
./vendor/bin/sail up -d
- Generate laravel key
./vendor/bin/sail php artisan key:generate
- Migrate db structure
./vendor/bin/sail php artisan migrate