PHPackages                             subhashladumor1/laravel-cidi - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. subhashladumor1/laravel-cidi

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

subhashladumor1/laravel-cidi
============================

laravel-cidi is a powerful Laravel package that auto-generates Docker setup and CI/CD workflows. Simplify Laravel deployment, pipeline, DevOps, and cloud integration with ready Dockerfile, docker-compose, and GitHub Actions. Fast, scalable, and time-saving for modern Laravel apps.

1.0.2(7mo ago)3141MITPHPPHP ^8.2CI failing

Since Sep 28Pushed 7mo agoCompare

[ Source](https://github.com/subhashladumor1/laravel-cidi)[ Packagist](https://packagist.org/packages/subhashladumor1/laravel-cidi)[ RSS](/packages/subhashladumor1-laravel-cidi/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)DependenciesVersions (5)Used By (0)

Laravel CIDI 🚀
==============

[](#laravel-cidi-)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d64d2b06498808d7bb9a254bdab12ddac30da012a126688f395f3cac18872b98/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737562686173686c6164756d6f72312f6c61726176656c2d636964692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/subhashladumor1/laravel-cidi)[![Total Downloads](https://camo.githubusercontent.com/0636ad256849589d3cb70ad83ada089ebf9b094fb2c9c2f9071df9776f666d9f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f737562686173686c6164756d6f72312f6c61726176656c2d636964692e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/subhashladumor1/laravel-cidi)[![PHP Version](https://camo.githubusercontent.com/2831751580c35357e554ee43bdc251d833ddc2fd1fd93f417e8f5c1369960740/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f737562686173686c6164756d6f72312f6c61726176656c2d636964693f7374796c653d666c61742d737175617265)](https://packagist.org/packages/subhashladumor1/laravel-cidi)[![Laravel Version](https://camo.githubusercontent.com/00b952940fdb058198f28166c9abf85975fb8d2e99eed5f746ec71e0060ba806/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e302532422d7265643f7374796c653d666c61742d737175617265)](https://laravel.com)

> **A powerful Laravel package that auto-generates Docker setup and CI/CD workflows for any Laravel project. Simplify Laravel deployment, pipeline, DevOps, and cloud integration with ready Dockerfile, docker-compose, and GitHub Actions. Fast, scalable, and time-saving for modern Laravel apps.**

🚀 Features
----------

[](#-features)

### 🐳 **Docker Integration**

[](#-docker-integration)

- **Auto-generated Dockerfile** with PHP 8.3, Composer, Node.js, and essential extensions
- **Complete docker-compose.yml** with app, nginx, mysql, redis services
- **Smart .dockerignore** file for optimized builds
- **Multi-stage builds** for production optimization
- **Health checks** and monitoring capabilities

### 🚀 **CI/CD Automation**

[](#-cicd-automation)

- **GitHub Actions workflows** for testing and deployment
- **Multi-environment support** (staging, production)
- **Docker registry integration** (Docker Hub, GHCR)
- **Automated testing** with PHPUnit and Laravel Dusk
- **Security auditing** and code quality checks
- **Slack/Discord notifications** for deployment status

### ⚙️ **Advanced Configuration**

[](#️-advanced-configuration)

- **Modular services** - Enable/disable optional services (Horizon, Mailhog, Meilisearch, MinIO)
- **Environment-specific** configurations
- **Custom commands** support during installation
- **Flexible database** options (MySQL, PostgreSQL)
- **Production-ready** optimizations

📋 Requirements
--------------

[](#-requirements)

### System Requirements

[](#system-requirements)

- **PHP**: 8.2 or higher
- **Composer**: Latest version
- **Docker**: 20.10+ (for Docker features)
- **Docker Compose**: 2.0+ (for multi-container setup)

### Optional Requirements

[](#optional-requirements)

- **Node.js**: 18+ (for frontend assets)
- **NPM/Yarn**: For package management
- **Git**: For version control
- **SSH**: For deployment (if using CI/CD)

📦 Installation
--------------

[](#-installation)

```
# Install via Composer
composer require subhashladumor1/laravel-cidi

# Publish configuration
php artisan vendor:publish --provider="Subhashladumor1\LaravelCidi\LaravelCidiServiceProvider" --tag="cidi-config"

# Run installation command
php artisan cidi:install
```

🚀 Quick Start Guide
-------------------

[](#-quick-start-guide)

### Configuration Setup

[](#configuration-setup)

```
# Publish configuration file
php artisan vendor:publish --provider="Subhashladumor1\LaravelCidi\LaravelCidiServiceProvider" --tag="cidi-config"

# This creates config/cidi.php with all available options
```

### Install Package

[](#install-package)

```
# Basic installation
php artisan cidi:install

# With database migration
php artisan cidi:install --migrate

# With database seeding
php artisan cidi:install --seed

# With custom commands
php artisan cidi:install --command="migrate:fresh" --command="db:seed --class=UserSeeder"

# Force overwrite existing files
php artisan cidi:install --force
```

### Generate Docker Configuration

[](#generate-docker-configuration)

```
# Generate all Docker files
php artisan cidi:docker

# Generate with specific services
php artisan cidi:docker --services=horizon,mailhog,meilisearch

# Force overwrite existing files
php artisan cidi:docker --force
```

### Generate CI/CD Workflows

[](#generate-cicd-workflows)

```
# Generate all workflows
php artisan cidi:workflow

# Generate only CI workflow
php artisan cidi:workflow --type=ci

# Generate only deploy workflow
php artisan cidi:workflow --type=deploy

# Force overwrite existing workflows
php artisan cidi:workflow --force
```

### Start Docker Services

[](#start-docker-services)

```
# Start all services
docker-compose up -d

# Start specific services
docker-compose up -d app nginx mysql redis

# Start with optional services
docker-compose --profile horizon --profile mailhog up -d

# View logs
docker-compose logs -f
```

### Verify Installation

[](#verify-installation)

```
# Check if services are running
docker-compose ps

# Test database connection
docker-compose exec app php artisan migrate:status

# Check application health
curl http://localhost:8080
```

🐳 Docker Services
-----------------

[](#-docker-services)

### Core Services

[](#core-services)

ServiceDescriptionPortImage**app**Laravel application with PHP-FPM9000`php:8.3-fpm-alpine`**nginx**Web server and reverse proxy8080`nginx:alpine`**mysql**Database server3306`mysql:8.0`**redis**Cache and session storage6379`redis:7-alpine`### Optional Services

[](#optional-services)

ServiceDescriptionPortWhen to Use**horizon**Queue worker (Laravel Horizon)-Production queue processing**mailhog**Email testing8025Development email testing**meilisearch**Search engine7700Full-text search functionality**minio**S3-compatible storage9000File storage and uploads🚀 CI/CD Workflows
-----------------

[](#-cicd-workflows)

### CI Workflow (`laravel-ci.yml`)

[](#ci-workflow-laravel-ciyml)

**Features:**

- PHP 8.3 setup with extensions
- Composer dependency installation
- NPM dependency installation and build
- PHPUnit testing with coverage
- Laravel Dusk testing (optional)
- Security auditing
- Docker image building
- Code quality checks

**Triggers:**

- Pull requests to main branch
- Pushes to main branch
- Manual workflow dispatch

### Deploy Workflow (`laravel-deploy.yml`)

[](#deploy-workflow-laravel-deployyml)

**Features:**

- Staging and production deployments
- SSH-based deployment
- Docker registry support (Docker Hub, GHCR)
- Slack/Discord notifications
- Health checks
- Automatic migrations and cache clearing
- Rollback capabilities

**Environments:**

- **Staging**: Auto-deploy from develop branch
- **Production**: Auto-deploy from main branch

⚙️ Configuration
----------------

[](#️-configuration)

### Basic Configuration

[](#basic-configuration)

```
// config/cidi.php
return [
    'php_version' => '8.3', // 8.2 or 8.3

    'database' => [
        'type' => 'mysql', // mysql or postgres
        'version' => '8.0',
        'port' => '3306',
        'database' => 'laravel',
        'username' => 'laravel',
        'password' => 'password',
    ],

    'services' => [
        'horizon' => false,
        'mailhog' => true,
        'meilisearch' => false,
        'minio' => false,
        'redis' => true,
    ],

    'cicd' => [
        'staging' => [
            'enabled' => true,
            'server' => env('CIDI_STAGING_SERVER'),
            'user' => env('CIDI_STAGING_USER'),
            'path' => '/var/www/staging',
        ],
        'production' => [
            'enabled' => true,
            'server' => env('CIDI_PRODUCTION_SERVER'),
            'user' => env('CIDI_PRODUCTION_USER'),
            'path' => '/var/www/production',
        ],
    ],
];
```

### Environment Variables

[](#environment-variables)

Add these to your `.env` file:

```
# PHP Version
CIDI_PHP_VERSION=8.3

# Database Configuration
CIDI_DB_TYPE=mysql
CIDI_DB_VERSION=8.0
CIDI_DB_PORT=3306
CIDI_DB_DATABASE=laravel
CIDI_DB_USERNAME=laravel
CIDI_DB_PASSWORD=password

# Services Configuration
CIDI_HORIZON_ENABLED=true
CIDI_MAILHOG_ENABLED=true
CIDI_MEILISEARCH_ENABLED=false
CIDI_MINIO_ENABLED=false
CIDI_REDIS_ENABLED=true

# CI/CD Configuration
CIDI_STAGING_SERVER=staging.example.com
CIDI_STAGING_USER=deploy
CIDI_STAGING_PATH=/var/www/staging
CIDI_PRODUCTION_SERVER=production.example.com
CIDI_PRODUCTION_USER=deploy
CIDI_PRODUCTION_PATH=/var/www/production

# Registry Configuration
CIDI_REGISTRY_ENABLED=true
CIDI_REGISTRY_TYPE=ghcr
CIDI_REGISTRY_USERNAME=your-username
CIDI_REGISTRY_REPOSITORY=your-repo

# Notifications
CIDI_SLACK_ENABLED=true
CIDI_SLACK_WEBHOOK=https://hooks.slack.com/services/...
CIDI_DISCORD_ENABLED=false
CIDI_DISCORD_WEBHOOK=https://discord.com/api/webhooks/...
```

🔧 Troubleshooting
-----------------

[](#-troubleshooting)

### Common Docker Issues

[](#common-docker-issues)

#### 1. **Docker Build Context Error**

[](#1-docker-build-context-error)

**Error:**

```
failed to solve: invalid file request public/storage

```

**Solution:**

```
# Create the missing directory
mkdir -p public/storage

# Create storage link
php artisan storage:link

# Clean Docker build cache
docker system prune -a

# Rebuild with no cache
docker-compose build --no-cache

# Start services
docker-compose up -d
```

#### 2. **Database Connection Error**

[](#2-database-connection-error)

**Error:**

```
SQLSTATE[HY000] [2002] No such file or directory

```

**Solution:**

```
# Check if MySQL container is running
docker-compose ps mysql

# Check MySQL logs
docker-compose logs mysql

# Restart MySQL service
docker-compose restart mysql

# Wait for MySQL to be ready
docker-compose exec mysql mysqladmin ping -h localhost

# Test connection
docker-compose exec app php artisan migrate:status
```

#### 3. **Permission Issues**

[](#3-permission-issues)

**Error:**

```
Permission denied on storage directory

```

**Solution:**

```
# Fix storage permissions
sudo chown -R $USER:$USER storage bootstrap/cache
chmod -R 775 storage bootstrap/cache

# Or run with Docker
docker-compose exec app chown -R www-data:www-data storage bootstrap/cache
docker-compose exec app chmod -R 775 storage bootstrap/cache
```

#### 4. **Port Already in Use**

[](#4-port-already-in-use)

**Error:**

```
Port 8080 is already in use

```

**Solution:**

```
# Check what's using the port
lsof -i :8080

# Kill the process
kill -9

# Or change the port in docker-compose.yml
# ports:
#   - "8081:80"
```

#### 5. **Docker Build Failures**

[](#5-docker-build-failures)

**Error:**

```
Build failed with exit code 1

```

**Solution:**

```
# Clean everything
docker-compose down
docker system prune -a
docker volume prune

# Rebuild from scratch
docker-compose build --no-cache
docker-compose up -d

# Check build logs
docker-compose logs app
```

### Database Issues

[](#database-issues)

#### 1. **MySQL Connection Refused**

[](#1-mysql-connection-refused)

```
# Check MySQL status
docker-compose exec mysql mysqladmin ping

# Check MySQL configuration
docker-compose exec mysql cat /etc/mysql/my.cnf

# Restart MySQL
docker-compose restart mysql

# Check logs
docker-compose logs mysql
```

#### 2. **Database Not Found**

[](#2-database-not-found)

```
# Create database
docker-compose exec mysql mysql -u root -p -e "CREATE DATABASE laravel;"

# Grant permissions
docker-compose exec mysql mysql -u root -p -e "GRANT ALL PRIVILEGES ON laravel.* TO 'laravel'@'%';"

# Flush privileges
docker-compose exec mysql mysql -u root -p -e "FLUSH PRIVILEGES;"
```

### Redis Issues

[](#redis-issues)

#### 1. **Redis Connection Failed**

[](#1-redis-connection-failed)

```
# Check Redis status
docker-compose exec redis redis-cli ping

# Check Redis logs
docker-compose logs redis

# Restart Redis
docker-compose restart redis
```

### Application Issues

[](#application-issues)

#### 1. **Laravel Application Not Loading**

[](#1-laravel-application-not-loading)

```
# Check application logs
docker-compose logs app

# Check nginx logs
docker-compose logs nginx

# Restart application
docker-compose restart app nginx

# Clear Laravel caches
docker-compose exec app php artisan config:clear
docker-compose exec app php artisan cache:clear
docker-compose exec app php artisan route:clear
docker-compose exec app php artisan view:clear
```

#### 2. **Composer Dependencies Issues**

[](#2-composer-dependencies-issues)

```
# Install dependencies
docker-compose exec app composer install

# Update dependencies
docker-compose exec app composer update

# Clear composer cache
docker-compose exec app composer clear-cache
```

### Debug Mode

[](#debug-mode)

```
# Enable debug mode
APP_DEBUG=true docker-compose up

# View detailed logs
docker-compose logs -f --tail=100

# Check container status
docker-compose ps

# Inspect container
docker-compose exec app php artisan config:show
```

📚 API Reference
---------------

[](#-api-reference)

### Available Commands

[](#available-commands)

CommandDescriptionOptions`php artisan cidi:install`Install package and publish config files`--migrate`, `--seed`, `--force`, `--command``php artisan cidi:docker`Generate Docker configuration files`--services`, `--force``php artisan cidi:workflow`Generate GitHub Actions workflows`--type`, `--force``php artisan cidi:generate all`Generate all configuration files`--force`### Command Options

[](#command-options)

#### `cidi:install` Options

[](#cidiinstall-options)

```
--migrate              Run database migrations
--seed                 Run database seeders
--force                Overwrite existing files
--command="command"    Run custom commands (can be used multiple times)
```

#### `cidi:docker` Options

[](#cididocker-options)

```
--services="service1,service2"    Enable specific services
--force                          Overwrite existing files
```

#### `cidi:workflow` Options

[](#cidiworkflow-options)

```
--type="ci|deploy"    Generate specific workflow type
--force              Overwrite existing files
```

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

🐛 Bug Reports
-------------

[](#-bug-reports)

If you discover a bug, please open an issue with:

- **Description** of the issue
- **Steps to reproduce** the problem
- **Expected behavior**
- **Actual behavior**
- **Environment details** (OS, PHP version, Laravel version, etc.)
- **Screenshots** (if applicable)

💡 Feature Requests
------------------

[](#-feature-requests)

We welcome feature requests! Please open an issue with:

- **Clear description** of the feature
- **Use case** and benefits
- **Possible implementation** approach
- **Additional context** or examples

📄 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE) for more information.

🙏 Credits
---------

[](#-credits)

- [Subhash Ladumor](https://github.com/subhashladumor1) - Creator and Maintainer
- [All Contributors](../../contributors) - Thank you for your contributions!

### Get Help

[](#get-help)

- 🐛 **Issues**: [GitHub Issues](https://github.com/subhashladumor1/laravel-cidi/issues)
- 💬 **Discussions**: [GitHub Discussions](https://github.com/subhashladumor1/laravel-cidi/discussions)

### Community

[](#community)

- ⭐ **Star** the repository if you find it useful
- 🍴 **Fork** the repository to contribute
- 📢 **Share** with your team and colleagues
- 🐛 **Report** bugs and issues
- 💡 **Suggest** new features

---

**Made with ❤️ by [Subhash Ladumor](https://github.com/subhashladumor1)**

[![GitHub](https://camo.githubusercontent.com/4fcd516e2fde608afc9ddd1330de295d23981c27a9b9d695f8abe51f70a1efc5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769744875622d3130303030303f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562266c6f676f436f6c6f723d7768697465)](https://github.com/subhashladumor1)[![LinkedIn](https://camo.githubusercontent.com/835f91c273c180e842aa0b2fb0d5ccc52def20089589abbcefceb28317c583f8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c696e6b6564496e2d3030373742353f7374796c653d666f722d7468652d6261646765266c6f676f3d6c696e6b6564696e266c6f676f436f6c6f723d7768697465)](https://linkedin.com/in/subhash-ladumor)

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance63

Regular maintenance activity

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

226d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f38ba994870f0b2c8855e3f4614b1a8ecfecda7114fa4a8d261b9c6bb192b20b?d=identicon)[subhashladumor1](/maintainers/subhashladumor1)

---

Top Contributors

[![subhashladumor1](https://avatars.githubusercontent.com/u/79623012?v=4)](https://github.com/subhashladumor1 "subhashladumor1 (23 commits)")

---

Tags

automationci-cdcomposer-packagedeploymentdevopsdiscord-integrationdockerdocker-composedockerfilegithub-actionslaravellaravel-automationlaravel-docker-setuplaravel-packagemysqlnginxphpweb-developmentlaravelautomationdevopsdockerdeploymentGithub Actionsci-cd

### Embed Badge

![Health badge](/badges/subhashladumor1-laravel-cidi/health.svg)

```
[![Health](https://phpackages.com/badges/subhashladumor1-laravel-cidi/health.svg)](https://phpackages.com/packages/subhashladumor1-laravel-cidi)
```

###  Alternatives

[thecodeholic/laravel-hostinger-deploy

Laravel package for automated Hostinger deployment with GitHub Actions support

565.3k](/packages/thecodeholic-laravel-hostinger-deploy)[downtoworld/laravel-devops

Laravel Cloudflare-Tunnels Ready Production Docker-Compose

161.1k](/packages/downtoworld-laravel-devops)[innocenzi/deployer-recipe-forge

Seamless zero-downtime deployment on Forge with Deployer

1916.6k](/packages/innocenzi-deployer-recipe-forge)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
