Beyond Local Development
Sail isn't just for local — customize for production:
# Production Dockerfile optimizations
FROM php:8.3-fpm-alpine
RUN docker-php-ext-install opcache pdo_mysql
# Multi-stage build for smaller images
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
Docker Compose Stack
- App (PHP-FPM)
- Nginx (reverse proxy)
- Redis (cache/queues)
- MySQL/Postgres
- Meilisearch (search)