Git-Based Deployments: Push to Deploy for Self-Hosted Apps
Push code, trigger deployment. Git-based deployments bring the Vercel/Netlify experience to your self-hosted infrastructure.
The Goal
git push origin main → Your app is live with the new code.
Vercel and Netlify made this the standard developer experience. You can have it on self-hosted infrastructure too.
Approach 1: Git Hooks
The simplest method. A post-receive hook on the server builds and deploys.
Setup
1. Create a bare git repo on your server
2. Add a post-receive hook that:
Pros
Cons
Approach 2: CI/CD Pipeline
Gitea Actions, Woodpecker CI, or GitHub Actions builds the image and pushes to a registry. The server pulls and deploys.
Flow
1. Push to Gitea/GitHub
2. CI builds Docker image
3. CI pushes image to registry
4. CI triggers deployment (SSH or webhook)
5. Server pulls new image and restarts container
Pros
Cons
Approach 3: Coolify / CapRover
Platform-as-a-Service tools that provide push-to-deploy out of the box.
Coolify
CapRover
The TinyPod Approach
TinyPod deploys from container images. Your CI pipeline builds the image, TinyPod runs it. This separation means:
Recommendation
For most self-hosters:
1. Use GitHub/Gitea for code hosting
2. Use GitHub Actions or Gitea Actions for CI
3. Build and push Docker images to GHCR or Docker Hub
4. Deploy to TinyPod
Simple, reliable, and you get the push-to-deploy experience without running your own build infrastructure.