devops

Mentor-Wizard's avatarfrom Mentor-Wizard

Generates DevOps configurations and scripts for deploying and managing Laravel applications. Run local commands to debug and deploy.

⭐1stars🔀0forks📁View on GitHub🕐Updated Jan 3, 2026

When & Why to Use This Skill

This Claude skill automates the DevOps lifecycle for Laravel applications by generating robust configurations for Docker environments, CI/CD pipelines, and deployment scripts. It streamlines the transition from local development to production by providing pre-configured workflows for testing, linting, and high-performance server management, ensuring a reliable and scalable infrastructure.

Use Cases

  • Standardizing Development Environments: Quickly set up consistent Docker-based environments for Laravel teams to eliminate 'it works on my machine' issues.
  • Automating CI/CD Pipelines: Generate GitHub Actions workflows that automatically handle linting (Pint), static analysis (PHPStan), and parallel testing (Pest) for every pull request.
  • Optimizing Production Deployments: Configure high-performance Laravel environments using Octane and FrankenPHP for maximum application throughput.
  • Code Quality & Modernization: Implement automated scripts for Rector and PHPStan to ensure the codebase stays modern, secure, and follows industry best practices.
  • Local Debugging and Maintenance: Utilize pre-defined Composer scripts to manage database migrations, IDE helpers, and application debugging tools like Telescope and Xdebug.
namedevops

Devops

Instructions

Environment Setup

Option 1: Docker Development (Recommended)

# Copy environment file
cp .env.example .env

# Start all services
docker compose up -d

# Install PHP dependencies
docker compose exec app composer install

# Install Node dependencies
docker compose exec app yarn install

# Generate application key
docker compose exec app php artisan key:generate

# Run migrations
docker compose exec app php artisan migrate

# Build frontend assets
docker compose exec app yarn dev

Option 2: Local Development

Ensure PHP 8.4+ is installed, then:

# Install dependencies
composer install
yarn install

# Setup environment
cp .env.example .env
php artisan key:generate

# Configure database and run migrations
php artisan migrate

# Start development servers
composer run dev  # Starts Laravel Octane, queue worker, logs, and Vite

Development Scripts

All commands should run from a Docker container. The project includes several useful Composer scripts:

  • composer run dev - Start all development services (Octane, queue, logs, Vite)
  • composer run ide-helper - Generate IDE helper files
  • composer run phpstan - Run static analysis
  • composer run pint - Check code style
  • composer run pint:fix - Fix code style issues
  • composer run rector - Check for code modernization opportunities
  • composer run rector:fix - Apply code modernization

CI/CD Pipeline

The project uses GitHub Actions with:

  • Linting: PHPStan, Laravel Pint, Rector
  • Testing: Pest with coverage and mutation testing
  • Code Coverage: Codecov integration
  • Parallel Execution: Tests run in parallel for faster feedback

Environment-Specific Notes

  • Local Development: Use Docker Compose for consistent environment
  • Testing: Separate PostgreSQL instance for tests
  • Production: Optimized for Laravel Octane with FrankenPHP
  • Debugging: Xdebug available in development, Telescope for application debugging