Self-hosted dev agency platform
|
All checks were successful
Deploy Control Plane / Build and Deploy (push) Successful in 19s
localhost:8080 isn't accessible from runner container. Check health via docker exec into the stack-api container. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .forgejo/workflows | ||
| api | ||
| docs | ||
| infra | ||
| scripts | ||
| tenant/setup | ||
| tenants | ||
| test/e2e | ||
| web | ||
| .gitignore | ||
| .hetznerobjectkey | ||
| cloudzner | ||
| deploy.sh | ||
| Makefile | ||
| PLAN.md | ||
| README.md | ||
Cloudzner
A self-hosted dev agency platform: run all your projects, clients, and infrastructure from one control plane.
Buttery smooth: clone, one command, running. GitOps-native, CLI-driven, self-hosting.
Quick Start
# Clone and initialize
git clone <repo>
cd cloudzner
./cloudzner init
# Start locally
./cloudzner up
# Or use Make
make init
make up
Dashboard: http://localhost:5173 API: http://localhost:8080 Forgejo: http://localhost:3000
Deploy to Hetzner
# Set your Hetzner token
export HETZNER_TOKEN=your-token-here
# Or add to .hetznerkey file
# Provision and deploy
./cloudzner provision
./cloudzner deploy
# Check status
./cloudzner status
Project Structure
cloudzner/
├── cloudzner # Main CLI (Ruby, self-contained)
├── Makefile # Single entry point: make up, make deploy
│
├── api/ # Stack API service
│ ├── lib/stack/ # Ruby code
│ ├── db/migrations/ # Database migrations
│ ├── Dockerfile
│ └── Gemfile
│
├── web/ # Frontend dashboard (React/Vite)
│ ├── src/
│ └── package.json
│
├── infra/ # Infrastructure definitions
│ ├── docker-compose.yml # Local + production compose
│ ├── Caddyfile # Production reverse proxy
│ └── Caddyfile.dev # Development reverse proxy
│
├── scripts/ # Helper scripts
│ ├── bootstrap.sh # First-time setup
│ └── setup-forgejo.sh # Automated Forgejo config
│
└── .forgejo/workflows/ # CI/CD pipelines
├── ci.yml # Test on PR
└── deploy.yml # Deploy on push to main
CLI Commands
# Local Development
./cloudzner init # First-time setup
./cloudzner up # Start locally (docker compose up)
./cloudzner down # Stop services
./cloudzner logs [svc] # Stream logs
# Remote Deployment
./cloudzner provision # Provision server on Hetzner
./cloudzner deploy # Deploy to remote server
./cloudzner destroy # Tear down server
# Operations
./cloudzner status # Show all services
./cloudzner ssh # SSH into control plane
./cloudzner ip # Show server IPs
Domain Setup
Configure for your domain (e.g., bedrijven.online):
# Edit .env
CADDY_CONFIG=Caddyfile
DOMAIN=bedrijven.online
FORGEJO_ROOT_URL=https://git.bedrijven.online/
ACME_EMAIL=admin@bedrijven.online
Subdomains:
git.bedrijven.online- Forgejo (Git + CI/CD)api.bedrijven.online- Stack APIdash.bedrijven.online- Dashboard
Requirements
- Docker & Docker Compose
- Ruby 3.2+ (for provisioning)
- Hetzner Cloud account (for remote deployment)
Environment Variables
| Variable | Description | Default |
|---|---|---|
HETZNER_TOKEN |
Hetzner Cloud API token | - |
DOMAIN |
Primary domain | localhost |
POSTGRES_PASSWORD |
Database password | (generated) |
FORGEJO_SECRET |
Forgejo internal secret | (generated) |
ACME_EMAIL |
Let's Encrypt email | - |
License
Proprietary