PHPackages                             microsomes/laravel-devops - 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. microsomes/laravel-devops

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

microsomes/laravel-devops
=========================

Docker scaffold generator for Laravel projects with dev/prod environments

v1.0.0(3mo ago)0175MITPHPPHP ^8.1

Since Feb 5Pushed 3mo agoCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

Laravel DevOps
==============

[](#laravel-devops)

Docker scaffold generator for Laravel projects with separate dev/prod environments.

Installation
------------

[](#installation)

```
composer require microsomes/laravel-devops
```

Usage
-----

[](#usage)

### Generate Docker Configuration

[](#generate-docker-configuration)

```
php artisan docker:init
```

This will generate:

```
.docker/
├── dev/
│   ├── backend/Dockerfile
│   ├── frontend/Dockerfile
│   ├── frontend/conf.d/app.conf
│   └── node/Dockerfile
└── prod/
    ├── backend/Dockerfile
    ├── frontend/Dockerfile
    ├── frontend/conf.d/app.conf
    ├── docker-compose.yml
    └── .env.production

docker-compose.yml (dev)

```

### Options

[](#options)

```
# Overwrite existing files
php artisan docker:init --force

# Generate only development environment
php artisan docker:init --dev-only

# Generate only production environment
php artisan docker:init --prod-only
```

Configuration
-------------

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=docker-scaffold-config
```

Then edit `config/docker-scaffold.php`:

```
return [
    'project_name' => 'myapp',
    'network_name' => 'myapp-network',
    'php_version' => '8.2',
    'node_version' => '22',

    'ports' => [
        'frontend' => 8080,
        'vite' => 5173,
        'database' => 33066,
        'redis' => 63799,
        'mailhog_smtp' => 1025,
        'mailhog_web' => 8025,
    ],

    'database' => [
        'image' => 'mariadb:latest',
        'name' => 'laravel',
        'user' => 'root',
        'password' => 'password',
    ],

    'registry' => [
        'url' => 'registry.digitalocean.com/myregistry',
        'backend_image' => 'backend',
        'frontend_image' => 'frontend',
    ],

    'traefik' => [
        'enabled' => true,
        'domain' => 'example.com',
        'network' => 'traefik-public',
        'certresolver' => 'le',
    ],
];
```

Development
-----------

[](#development)

Start the development environment:

```
docker compose up -d
```

Services available:

- **Frontend**:
- **Vite**:
- **MailHog**:
- **Database**: localhost:33066
- **Redis**: localhost:63799

Production
----------

[](#production)

### Build and push images

[](#build-and-push-images)

```
# Build images
docker build -t your-registry/backend:latest -f .docker/prod/backend/Dockerfile .
docker build -t your-registry/frontend:latest -f .docker/prod/frontend/Dockerfile .

# Push to registry
docker push your-registry/backend:latest
docker push your-registry/frontend:latest
```

### Deploy with Docker Swarm

[](#deploy-with-docker-swarm)

```
cd .docker/prod
docker stack deploy -c docker-compose.yml myapp
```

Architecture
------------

[](#architecture)

### Development Environment

[](#development-environment)

- **backend**: PHP-FPM container with Composer
- **frontend**: Nginx reverse proxy
- **node**: Vite dev server with HMR
- **database**: MariaDB
- **redis**: Redis for caching/queues
- **horizon**: Laravel Horizon queue worker
- **scheduler**: Laravel task scheduler
- **mailhog**: Email testing

### Production Environment

[](#production-environment)

- **migrate**: One-time migration runner
- **backend**: Optimized PHP-FPM with built assets
- **frontend**: Nginx with static assets
- **database**: MariaDB with persistent volume
- **redis**: Redis for caching/queues
- Traefik integration for HTTPS

License
-------

[](#license)

MIT

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance81

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

101d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9940b31d70fbf4899954f58215a3460504cf7ea5538b6a8e17a77667bfc6d71c?d=identicon)[microsomes](/maintainers/microsomes)

### Embed Badge

![Health badge](/badges/microsomes-laravel-devops/health.svg)

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

###  Alternatives

[timokoerber/laravel-one-time-operations

Run operations once after deployment - just like you do it with migrations!

6481.7M11](/packages/timokoerber-laravel-one-time-operations)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[sammyjo20/lasso

Lasso - Asset wrangling for Laravel made simple.

355347.9k](/packages/sammyjo20-lasso)[stechstudio/laravel-env-security

Securely manage .env files for different deployment environments

77116.4k1](/packages/stechstudio-laravel-env-security)[aaronfrancis/airdrop

A Laravel package to deploy your application faster by skipping asset compilation when possible.

19594.9k](/packages/aaronfrancis-airdrop)[richdynamix/arc

Production ready docker based development environment for your Laravel project.

1163.1k](/packages/richdynamix-arc)

PHPackages © 2026

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