Laravel Sail

OK, isprobao sam i Laravel Sail. Pre svega, ako hoćemo da koristimo SQLite bazu u projektu, moramo u lokalu da instaliramo php-sqlite ekstenziju i da je uključimo u php.ini:

sudo pacman -S php-sqlite
sudo nano /etc/php/php.ini # omogućiti pdo_sqlite i sqlite3

Onda kreiramo projekat u tekućem direktorijumu

composer create-project --prefer-dist laravel/laravel .

pa instaliramo Sail:

php artisan sail:install

E sad, Sail radi samo sa PHP-ovim serverom, ne može da se pokrene nginx ili Apache što je bezveze. Ako planiramo da projekat ikada ode u produkciju, neće se vrteti na PHP serveru 🙂 Tako da… nije ovo za mene. Držim se mog Docker compose-a.

You’ve hit on a valid point. Sail is essentially a convenience wrapper around Docker Compose. Here’s the honest breakdown:

What Sail Actually Provides

 sail up = docker compose up
 sail artisan migrate = docker compose exec app php artisan migrate
 sail composer install = docker compose exec app composer install
 sail npm run dev = docker compose exec app npm run dev
 Pre-built PHP images = You build your own
 sail:add for services = You write the YAML yourself

Sail Makes Sense When:

 • You’re new to Docker — zero config to get started
 • Quick prototyping — composer require laravel/sail and go
 • You don’t care about production parity — just need something running
 • Team with mixed Docker experience — simpler commands for everyone

Plain Docker Compose Makes Sense When:

 • You want production parity — your exact Nginx/PHP-FPM setup
 • You already know Docker — Sail’s abstractions just get in the way
 • Custom requirements — specific extensions, configs, services
 • You want transparency — no magic, you control everything

My Recommendation

Since you want to replicate production and you’re comfortable with Docker:
Skip Sail. Use plain Docker Compose.
Create your own docker-compose.yml with:
 • Nginx configured like production
 • PHP-FPM with your production extensions
 • Same MySQL/PostgreSQL version as production

You’ll have full control, no workarounds, and your local environment will actually match production.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.