Homemade CI/CD: All-You-Can-Eat Buffet, Gourmet Food Truck… or Fine Dining?
At OBI Partner, we love coding in Python and PHP. But let’s be honest: the moment everything goes live in production often looks more like a comedy sketch than a well-prepared kitchen recipe.
Between smoking servers, crying databases, and developers swearing “but it works on my machine”… we had to find a better method.
That’s where self-hosted CI/CD comes in. No nosy SaaS platforms, no dependency on moody clouds: everything runs at home, in your own infra.
And the good news: I’ve cooked up several recipes for you 🔥.
🥘 Option A : GitLab CE ( All-You-Can-Eat buffet )
GitLab is the Chinese buffet of DevOps: it has everything. Forge, issues, merge requests, pipelines, Docker registry, monitoring… the only thing missing are the spring rolls.
Why you’ll love it
All-in-one: one interface, no need to chase after 10 tools.
Powerful pipeline: GitLab Runner does it all (Docker, Kubernetes, SSH).
Integrated registry: no hacks needed to store images.
Huge ecosystem: ask for help and you’re never alone.
Why you’ll suffer with it
RAM consumption: GitLab is an ogre. If you don’t feed it 16 GB, it looks at you like you tried serving it a salad.
Monolithic: you get the whole package, even if you don’t need half of it.
docker-compose GitLab CE
(Pro tip: run it on a dedicated server, otherwise it’ll strangle your other services like a hungry boa.)
🌮 Option B: Gitea + Woodpecker + Harbor (The Gourmet Food Truck)
If GitLab is the buffet, then Gitea + Woodpecker + Harbor is the gourmet food truck. Each tool is light, fast, and you pick exactly what goes on your plate.
Why you’ll love it
Super light: Gitea starts faster than a microwave.
Modular: grab only what you need.
Woodpecker CI: readable, easy-to-maintain pipelines.
Harbor: registry with built-in scanner (your digital bodyguard).
Why you’ll suffer with it
More plumbing: you need to connect the bricks yourself.
Fewer built-in tools: no advanced project management like GitLab.
docker-compose Gitea + Woodpecker + Harbor
👨🍳 Bonus Recipe: Python + PHP CI/CD Pipelines
👉 The goal is simple: check your code (lint), test it (unit tests), then deploy it.
GitLab CI
Woodpecker CI
🍱 Multi-Stage Dockerfiles
Laravel (PHP)
FastAPI (Python)
🚚 Automated Deployment with Ansible (Zero Downtime)
Playbook
👉 Run two containers in parallel (app_v1 and app_v2) and let Traefik handle a rolling update for you.
🔒 Air-Gapped Mode (The High-Tech Bunker)
Some companies want CI/CD in a sealed bunker: no internet, no dependencies phoning home to the US, everything stays inside your walls.
Sounds like Dark, but it works.
The secret ingredients
Nexus OSS: to mirror PyPI, Composer, npm, Docker Hub.
Harbor: to store Docker images internally.
Runners: always use internal images.
Ansible: deploy to your VMs or cluster without ever calling the outside world.
docker-compose Nexus
(Pro tip: set up Nexus in proxy mode → it fetches libraries once, then serves them locally like a master cheesemonger 🧀.)
🎩 Fine Dining Deployment: Deployer PHP for Laravel
Sometimes, you don’t want to bother with Docker Compose, Ansible, or Kubernetes.
You just want your Laravel code to reach the server quickly, cleanly, and with DB migrations executed without sweat.
That’s where Deployer PHP shines.
Imagine: one deploy.php, one dep deploy production, and your Laravel app is served like a Michelin-star dish 🍽️.
Pulls code from Git (Gitea, GitLab, whatever).
Installs dependencies with Composer.
Optimizes Laravel (
config:cache,route:cache).Deploys into a versioned
releases/folder.Symlinks
current→ instant deploy, no downtime.Runs migrations automatically.
👉 Add it to your GitLab or Woodpecker pipeline, and voilà: commit → pipeline → Deployer → production up-to-date.
No sweaty git pull over SSH at 2 AM.
Installation
Example of deploy.php
Conclusion
➡️ GitLab CE = All-you-can-eat buffet: everything included, but eats RAM for breakfast.
➡️ Gitea + Woodpecker = Gourmet food truck: light, fast, tasty, but needs some assembly.
➡️ Air-Gapped Mode = High-tech bunker: for sensitive industries (defense, health, nuclear).
➡️ Deployer PHP = Fine dining: Laravel deployment as refined as a white-gloved service.
At OBI Partner, we like to say:
“No matter the forge, as long as production comes out hot, without smoke, and without cold pizza.” 🔥
👉 So, are you more of a buffet lover, food truck enjoyer, bunker operator, or fine dining connoisseur?