Setting up the development environment with Sail

Latarips
Latarips

If youโ€™re looking to configure a cloned project for development using Sail, follow these straightforward steps:

๐Ÿš€ Environment setup

๐Ÿณ Needed tools

  1. Install Docker
  2. Clone this project: git clone [REPO_URL] my-app
  3. Move to the project folder: my-app

๐Ÿ› ๏ธ Environment configuration

  1. Copy the default environment variables: cp .env.example .env

๐ŸŒ Application execution

  1. 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
  1. Generate laravel key
./vendor/bin/sail php artisan key:generate
  1. Migrate db structure
./vendor/bin/sail php artisan migrate
#sail #docker #essentials