Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mg2k4's avatar

Dockavel - Production Docker Stack for Laravel

Hey Laracasts community! šŸ‘‹

I've been learning from Jeffrey's videos for years, and I wanted to share my first open source project with you all.

What is Dockavel?

A production-ready Docker stack for Laravel that handles deployment, SSL, and security automatically.

Why I Built It

After deploying Laravel apps for ~10 years, I got tired of repeating the same setup for every project:

  • Docker Compose configuration
  • Nginx and SSL setup
  • Server hardening (Fail2Ban, firewall, SSH)
  • Deployment scripts
  • Backup automation

So I built a stack that does it all with one command.

Features

Deployment:

  • One-command setup for development and production
  • Zero-downtime deployments
  • Automated health checks

SSL & Security:

  • Automatic SSL certificates (Let's Encrypt + Cloudflare)
  • Server hardening script (Fail2Ban, UFW, SSH)
  • Smart Cloudflare proxy detection

Stack:

  • Laravel 12+ with all optimizations
  • PHP 8.4-FPM
  • MySQL 8.0
  • Redis 7.0
  • Laravel Horizon
  • Nginx reverse proxy

Operations:

  • Automated database backups with retention
  • Log management
  • Email notifications
  • Easy restoration

Quick Start

git clone https://github.com/mg2k4/Dockavel.git
cd Dockavel
./scripts/deploy.sh dev

For production:

./scripts/server-setup.sh  # First time
./scripts/deploy.sh prod

Links

šŸ“š Documentation: https://dockavel.com
šŸ“¦ GitHub: https://github.com/mg2k4/Dockavel

Feedback Welcome

This is my first open-source project, so I'd really appreciate any feedback from this community!

What features would you like to see? What could be improved?

Free and MIT licensed. šŸš€


P.S. - If you've struggled with Laravel deployment before, I'd love to hear about your pain points. Always looking to improve!

2 likes
2 replies
vincent15000's avatar

I don't have time to have a look immediately.

Hmmmm ... which Docker configuration are you using for production ? This one provided by default in the Laravel installation ?

mg2k4's avatar

Thanks for checking it out!

No, it's a completely separate production-optimized stack. Laravel's default Docker setup (Sail) is great for local development, but it's not designed for production deployment.

Dockavel provides:

  • Automated SSL (Let's Encrypt + Cloudflare)
  • Security hardening (Fail2Ban, UFW, SSH)
  • Zero-downtime deployments
  • Production-optimized Nginx + PHP-FPM configs

One command deploys everything for both dev and prod, with health checks and automated backups. Plus script helpers for common tasks (deployments, Laravel commands, etc.).

Structure: The GitHub repo contains a Laravel 12 base - my additions are mainly in /docker and /scripts folders, so you can see exactly what's different from a standard Laravel installation.

This has been my personal Laravel starter kit for several years, refined over time to eliminate deployment friction. Finally decided to make it public hoping it can help others!

Docs: https://dockavel.com

Let me know if you have questions!

Please or to participate in this conversation.