Dockavel – Production-Ready Docker Stack for Laravel
Jenkins
Source: Dev.to | Jan 21, 2026 (UTC)
After 10 years of deploying Laravel applications, I’ve open-sourced the Docker stack I’ve been using in production.
The Problem
Every new Laravel project meant several hours of:
Configuring Docker Compose
Setting up Nginx and SSL certificates
Server hardening (Fail2Ban, firewall, SSH)
Writing deployment scripts
Debugging permissions
It was never the interesting part—just friction before actual work could begin.
The Solution: Dockavel
A production-ready Docker environment that handles everything with one command:
./scripts/deploy.sh prod
Enter fullscreen mode
Exit fullscreen mode
What It Does
🚀 One-Command Deployment
Development: ./scripts/dev.sh up
Production: ./scripts/deploy.sh prod
Zero-downtime deployments
🔐 Automatic SSL
Let’s Encrypt integration with auto-renewal
Cloudflare origin certificates support
Smart proxy detection
HTTP to HTTPS redirects
🛡️ Security Hardening
Server setup script configures:
Fail2Ban for SSH and HTTP protection
UFW firewall with minimal ports
SSH hardening (key-only, custom port)
Automatic security updates
📦 Full Production Stack
Laravel 12+ with all optimizations
PHP 8.4-FPM with all extensions
MySQL 8.0 with persistent volumes
Redis 7.0 for caching and sessions
Laravel Horizon for queue monitoring
Nginx as reverse proxy
💾 Automated Backups
Daily database backups
Configurable retention (7/30/90 days)
Email notifications
One-command restoration
Quick Start
# Clone the repository git clone https://github.com/mg2k4/Dockavel.git my-project cd my-project # Development ./scripts/deploy.sh dev # Production (on your server) ./scripts/server-setup.sh # First time only ./scripts/deploy.sh prod
Enter fullscreen mode
Exit fullscreen mode
Your app is now running with SSL, security hardening, and automated backups!
What Makes It Different
Laravel Sail: Great for local development, not production-focused
Laradock: Offers many options but complex for production
Dockavel: Production-first, opinionated, one command to deploy
This is my first time releasing something open source. I’ve been using variations of this stack for 5+ years in production, and I finally cleaned it up to share.
Feedback, issues, and PRs are very welcome! Let me know what features you’d like to see.
License
MIT – Free to use, modify, and distribute.
If this saves you even a few hours of Docker configuration, I’ll consider it a success. Happy deploying! 🚀
What deployment challenges are you facing with Laravel? Let me know in the comments!
For further actions, you may consider blocking this person and/or reporting abuse
Залишити відповідь