Skip to content

Instantly share code, notes, and snippets.

@mmartinjoo
Last active May 31, 2024 14:12
Show Gist options
  • Save mmartinjoo/702d085da5ed2a0f162c686073bdf942 to your computer and use it in GitHub Desktop.
Save mmartinjoo/702d085da5ed2a0f162c686073bdf942 to your computer and use it in GitHub Desktop.
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

nginx

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

Deployment

  • 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
  • HTTPS

Optimization

  • 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

Docker

  • 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

docker-compose

  • 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
@artemnl
Copy link

artemnl commented Sep 29, 2023

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

@rodrigolabs
Copy link

Octane in production, please :)

@mmartinjoo
Copy link
Author

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

Yes, anytime! Just send me a mail.

@mmartinjoo
Copy link
Author

Is Premium Package contain all of this ??

Yes!

@mmartinjoo
Copy link
Author

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"

@fernandokbs
Copy link

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

@indigoram89
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!

@aeq-dev
Copy link

aeq-dev commented Jan 17, 2024

May be the new Frankenphp tool

@indigoram89
Copy link

+1 for FrankenPHP (Octane)

@santiagopereyramarchetti
Copy link

santiagopereyramarchetti commented Jan 23, 2024

Hi! i want to know if:
1 - Do you plan to add helm soon?
2 - Do you plan add dockerize an Inertia with Vue and Laravel app, not Vue and Laravel API ?

@cAstraea
Copy link

Does it touch on the alternatives runners like swoole / frankenphp / roadrunner etc
Though I think it's a bit out of scope.

@ds-hoanganh-pham
Copy link

I'm extremely interested in Terraform! Have you completed it yet?

@mmartinjoo
Copy link
Author

I'm extremely interested in Terraform! Have you completed it yet?

Yes, Terraform is included!

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