Skip to content

Instantly share code, notes, and snippets.

Last active December 3, 2023 10:21
  • Star 15 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
DevOps with Laravel Table of Contents

Topics coming in the next edition:

  • ✅ Load balancers from scratch (published on 10th of October)
  • ✅ Terraform (published on 12th of November)
  • HELM

Fundamentals - 208 pages (Basic package)

Building a pipeline


  • Serving static content
  • CGI, FastCGI, php-fpm
  • CGI
  • FastCGI
  • php-fpm
  • nginx and PHP
  • nginx and Vue
  • Combined nginx config


  • Deploy script
  • Deploying from a pipeline
  • Provisioning new servers

Queues and workers

  • supervisor
  • Multiple queues and priorities
  • Deploying workers
  • Optimizing worker processes

Domains and HTTPS with nginx

  • Domain


  • nginx worker processes and connections
  • fpm processes
  • opcache
  • gzip
  • HTTP2
  • TLS1.3
  • nginx cache
  • Caching static content
  • Caching fastcgi responses

Backups and restore

  • AWS S3
  • spatie/laravel-backup
  • Restore script


  • The basics in theory
  • The basics in practice
  • Overview of the application
  • Dockerizing a Laravel API
  • Dockerizing a Vue app
  • Dockerizing a scheduler and a worker


  • Frontend

  • API

  • Databases

  • Migrations

  • nginx

  • Reverse proxy

  • Scheduler and worker

  • supervisor

  • Custom built images for MySQL and nginx

  • Building images in a pipeline

  • Optimizing the pipeline

    • Docker layers
    • Back to the pipeline
  • Production-ready docker-compose

    • Docker named volumes vs bind mounts
  • Deployment

    • Deploy script
    • Deploying from a pipeline
    • Provisioning new servers
    • update service
    • Restore
    • Rollback
    • Automatic image updates
  • GitFlow

    • Pushing to develop or main
    • Opening a PR to main
    • Opening a PR to develop (feature branches)
    • Reusing jobs (composite actions)
  • Final touches

    • Frontend, nginx, and proxy
    • Worker & Scheduler
  • Limitations of docker-compose

Docker Swarm - 75 pages (Plus package)

  • State
  • Basic concepts
  • Workers, managers, and leaders
  • Creating a cluster
  • Application-level changes
  • Deploying a stack
  • Service placements
  • Scaling services
    • API and nginx
    • Worker
    • Visualizing the cluster
    • Protecting the databases
    • Protecting user-facing service
    • Ingress routing mesh
  • Health checks
  • Restarting services
  • Updating services
  • Rolling back services
  • Deployment
    • Deploying from a pipeline
    • Update service
    • Provisioning nodes

Monitoring and error tracking

  • Uptime
    • Uptime robot
    • DigitalOcean
  • Health check monitors
    • Health checks in a cluster
  • Server resource alerts
  • Error tracking

Kubernetes - 77 pages (Premium package)

  • Introduction
  • Basic concepts
    • Pod
    • ReplicaSet
    • Deployment
  • Creating a cluster
  • Managed databases
  • Deploying a Laravel API
    • Configuring the deployment
    • Configs and secrets
    • Applying the deployment
    • Shortcuts
    • kubectl apply
  • Deploying nginx
  • Communication between nginx and FPM
  • Deploying a worker
  • Deploying a scheduler
  • Deploying a frontend
  • Running migrations in a cluster
  • Caching configs
  • Liveness and readiness probes
    • API probes
    • nginx probes
    • worker probes
    • frontend probes
    • timeoutSeconds
  • Autoscaling pods
    • Metrics server
  • Rolling update config
    • maxUnavailable
    • maxSurge
  • Resource requests and limits
  • Health check pods
  • Exposing the application
    • Ingress
    • Ingress controller & load balancer
    • Domain & HTTPS
  • Deploying the cluster from a pipeline
    • Secrets
    • Image versions
    • Ship it
    • kubectl & doctl
  • Monitoring the cluster

Serverless - 29 pages (Premium package)

  • Introduction
  • Platform-as-a-service
  • Serverless functions
  • The architecture of a code review tool
    • Overview
    • Webhook
    • Scheduler
    • Adding functions
  • Serverless Laravel on AWS
    • The serverless framework
    • bref

Load balancers from scratch - 18 pages (Premium package)

  • The basics of load balancers
  • nginx as a load balancer
  • Managed load balancers
  • Load balancing with docker-compose
  • Caching with a load balancer

Other ideas for future editions

  • ✅ Load balancers from scratch
  • Terraform
  • HELM
  • Implementing an autoscaler from sratch
  • How to choose a cluster size
  • Grafana Cloud
  • System design of an uptime service
Copy link

Can I buy the plus package and top up later to the premium package?

Copy link

Thanks for a great resource, Martin. I'm personally going to hold off from buying for now, but it's on my "to-get" list.
I'm working on Larvel + Nuxt + Vue + Ionic Capacitor/AppFlow at the moment which brings in the two main Mobile app stores and CI/CD functionality as well. (Flutter+Dart is also an option which I'm sure some devs would prefer to apply.) Once I have come to grips with that, your DevOps with Laravel guidance will be next.

I'm also interested in learning how we could extend the content you have here in the ToC in terms of applying Octane, WAFs and CDNs like Cloudflare for example, and also tying in with distributed cloud DB platforms; PlanetScale SingleStore, Clickhouse, etc. Maybe for those who are users of Forge, some comparisons between your approach and it could be a good consideration to include in your future work.

Answering "Whys, Whens, Wheres" etc. is often more important knowledge to have than the "Hows".

It is an ever-evolving topic/field and I'm sure there are a variety of others who would all love to see how the Laravel-based tech & its peripheral tools + tech can be applied as a "flexible, holistic scalable" implementations from a DevOps perspective.

May it grow as you envisage it should be!

Copy link

artemnl commented Sep 29, 2023

I want to request Traefik and optimizing FE pipelines with Bun\Vite.

Copy link

Octane in production, please :)

Copy link

Can I buy the plus package and top up later to the premium package?

Yes, anytime! Just send me a mail.

Copy link

Is Premium Package contain all of this ??


Copy link

Hey Everyone!

Tomorrow (10th of October) a new update is going to be available! I added a new 18-page chapter called "Load balancers from scratch"

Copy link

Just curious, why keep writing nginx like this, shouldn't be Nginx ??

Copy link

Hey Everyone!

Tomorrow (10th of October) a new update is going to be available! I added a new 18-page chapter called "Load balancers from scratch"

Wow! Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment