<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: William</title>
    <description>The latest articles on DEV Community by William (@mg2k4).</description>
    <link>https://dev.to/mg2k4</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3724444%2Fd4d410c5-813e-4721-a914-c6ea180f226c.png</url>
      <title>DEV Community: William</title>
      <link>https://dev.to/mg2k4</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mg2k4"/>
    <language>en</language>
    <item>
      <title>Dockavel - Production-Ready Docker Stack for Laravel</title>
      <dc:creator>William</dc:creator>
      <pubDate>Wed, 21 Jan 2026 20:09:07 +0000</pubDate>
      <link>https://dev.to/mg2k4/dockavel-production-ready-docker-stack-for-laravel-3ike</link>
      <guid>https://dev.to/mg2k4/dockavel-production-ready-docker-stack-for-laravel-3ike</guid>
      <description>&lt;p&gt;After 10 years of deploying Laravel applications, I've open-sourced the Docker stack I've been using in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Every new Laravel project meant several hours of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuring Docker Compose&lt;/li&gt;
&lt;li&gt;Setting up Nginx and SSL certificates&lt;/li&gt;
&lt;li&gt;Server hardening (Fail2Ban, firewall, SSH)&lt;/li&gt;
&lt;li&gt;Writing deployment scripts&lt;/li&gt;
&lt;li&gt;Debugging permissions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It was never the interesting part—just friction before actual work could begin.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: Dockavel
&lt;/h2&gt;

&lt;p&gt;A production-ready Docker environment that handles everything with one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./scripts/deploy.sh prod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What It Does
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🚀 One-Command Deployment
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Development: &lt;code&gt;./scripts/dev.sh up&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Production: &lt;code&gt;./scripts/deploy.sh prod&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Zero-downtime deployments&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔐 Automatic SSL
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Let's Encrypt integration with auto-renewal&lt;/li&gt;
&lt;li&gt;Cloudflare origin certificates support&lt;/li&gt;
&lt;li&gt;Smart proxy detection&lt;/li&gt;
&lt;li&gt;HTTP to HTTPS redirects&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🛡️ Security Hardening
&lt;/h3&gt;

&lt;p&gt;Server setup script configures:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fail2Ban for SSH and HTTP protection&lt;/li&gt;
&lt;li&gt;UFW firewall with minimal ports&lt;/li&gt;
&lt;li&gt;SSH hardening (key-only, custom port)&lt;/li&gt;
&lt;li&gt;Automatic security updates&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📦 Full Production Stack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Laravel 12+&lt;/strong&gt; with optimizations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PHP 8.4-FPM&lt;/strong&gt; with xtensions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MySQL 8.0&lt;/strong&gt; with persistent volumes&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Redis 7.0&lt;/strong&gt; for caching and sessions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Laravel Horizon&lt;/strong&gt; for queue monitoring&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nginx&lt;/strong&gt; as reverse proxy&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  💾 Automated Backups
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Daily database backups&lt;/li&gt;
&lt;li&gt;Configurable retention (7/30/90 days)&lt;/li&gt;
&lt;li&gt;Email notifications&lt;/li&gt;
&lt;li&gt;One-command restoration&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick Start
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone the repository&lt;/span&gt;
git clone https://github.com/mg2k4/Dockavel.git my-project
&lt;span class="nb"&gt;cd &lt;/span&gt;my-project

&lt;span class="c"&gt;# Development&lt;/span&gt;
./scripts/deploy.sh dev

&lt;span class="c"&gt;# Production (on your server)&lt;/span&gt;
./scripts/server-setup.sh  &lt;span class="c"&gt;# First time only&lt;/span&gt;
./scripts/deploy.sh prod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your app is now running with SSL, security hardening, and automated backups!&lt;/p&gt;

&lt;h2&gt;
  
  
  What Makes It Different
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Laravel Sail:&lt;/strong&gt; Great for local development, not production-focused&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Laradock:&lt;/strong&gt; Offers many options but complex for production&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Dockavel:&lt;/strong&gt; Production-first, opinionated, one command to deploy&lt;/p&gt;

&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌─────────────┐
│   Nginx     │ ← SSL termination, reverse proxy
└──────┬──────┘
       │
┌──────▼──────┐
│  PHP-FPM    │ ← Laravel application
└──────┬──────┘
       │
   ┌───┴───┬─────────┐
   │       │         │
┌──▼──┐  ┌─▼───┐  ┌──▼────┐
│MySQL│  │Redis│  │Horizon│
└─────┘  └─────┘  └───────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;p&gt;📚 &lt;strong&gt;Documentation:&lt;/strong&gt; &lt;a href="https://dockavel.com" rel="noopener noreferrer"&gt;https://dockavel.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;
📦 &lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/mg2k4/Dockavel" rel="noopener noreferrer"&gt;https://github.com/mg2k4/Dockavel&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🎥 &lt;strong&gt;Demo Video:&lt;/strong&gt; &lt;a href="https://www.youtube.com/watch?v=o-kj-T2QlXw" rel="noopener noreferrer"&gt;https://www.youtube.com/watch?v=o-kj-T2QlXw&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  My First Open Source Project
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Feedback, issues, and PRs are very welcome! Let me know what features you'd like to see.&lt;/p&gt;

&lt;h2&gt;
  
  
  License
&lt;/h2&gt;

&lt;p&gt;MIT - Free to use, modify, and distribute.&lt;/p&gt;




&lt;p&gt;If this saves you even a few hours of Docker configuration, I'll consider it a success. Happy deploying! 🚀&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What deployment challenges are you facing with Laravel? Let me know in the comments!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>docker</category>
      <category>php</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
