8000 GitHub - RomanMIzulin/Light-PaaS: simplest PaaS for deploying VPSs · GitHub
[go: up one dir, main page]

Skip to content

About

simplest PaaS for deploying VPSs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

light-paas

Agent-first, self-hosted PaaS with native builds — no Docker, no Nixpacks, no runtime VM. Deploy uv (Python), bun/npm (JS/TS), elm, and static sites directly as OS processes on a VPS you own.

Designed as a lighter alternative to better-paas: same control-plane ideas (Go + SQLite + scoped agent tokens + audit), but the deployment engine runs native toolchains instead of Docker.


What it is

  • One static Go binary (~12 MB) — no runtime, no cgo. SQLite (modernc.org/sqlite) for state.
  • Native build pipeline — uv sync --frozen, bun install --frozen-lockfile, npm ci, elm make … --optimize; frozen-first with lockfile gating. See docs/build-matrix.md.
  • Built-in process supervisor — spawns apps as child OS processes, streams logs, health-gates before cutover, restarts with exponential backoff. No systemd, no Docker.
  • Built-in reverse proxy + Let's Encrypt — autocert (ACME) in the same binary; route {app}.yourdomain.com → app port. No Caddy, no nginx.
  • Scoped agent tokens — separate revocable tokens for AI tools/CI with apps:read, deploy:trigger, logs:read, etc. (the better-paas idea, simplified).
  • Audit log — every mutating action recorded with actor + IP.
  • CLI lp — deploy, logs, stop/start/redeploy, agents from the shell (--json for agents/scripts).
  • Agent skill — skills/lp-usage/SKILL.md (Agent Skills standard, also installed at .prime/agent/skills/lp-usage/).
  • Elm dashboard — tiny SPA compiled by elm make and embedded into the binary.

Quick start

make build            # builds ./lp (requires go 1.25+, elm for the dashboard)
./lp                  # API on :8080, proxy on :80
cat data/admin_token.txt   # first-boot admin token

Deploy from the CLI:

./lp login http://localhost:8080 "$(cat data/admin_token.txt)"
./lp deploy https://github.com/you/fastapi-app --name api
./lp logs api

Or the dashboard: open http://localhost:8080, paste the token.

Environment

Variable Default Purpose
LISTEN_ADDR :8080 API + dashboard
PROXY_ADDR :80 app reverse proxy (+ ACME HTTP-01)
TLS_ADDR :443 TLS listener
APP_DOMAIN — base domain for {app}.{domain} routing
PUBLIC_IP — for {app}.{ip}.sslip.io URLs
ACME_EMAIL — enable autocert (Let's Encrypt) when set
PORT_MIN/PORT_MAX 9000/9999 app port pool
LP_DATA_DIR/LP_BUILDS_DIR data/builds state + build artifacts
ADMIN_TOKEN generated override admin token
TRUST_PROXY false honor X-Forwarded-For

Architecture

See docs/architecture.md for the full design and the decisions taken from better-paas (and the ones deliberately changed).

Deploy model

detect → install → build → start (supervised process)

Runtimes auto-detected in this order (docs/build-matrix.md is authoritative):

  1. elm — elm.json ("type": "application")
  2. uv — uv.lock > pyproject.toml > requirements.txt
  3. bun — package.json packageManager / bun.lock / bun.lockb
  4. npm — package-lock.json / bare package.json
  5. static — index.html at root/public/dist/out/build/_site

Ambiguous roots (e.g. pyproject.toml + package.json) are rejected with a clear error — set buildMethod or rootDir explicitly. Every default can be overridden per app (installCommand/buildCommand/startCommand/healthPath).

API

Bearer-token auth. GET /api/health and POST /api/auth/login are public.

  • GET /api/apps, POST /api/apps, GET/PUT/DELETE /api/apps/{id}
  • POST /api/apps/{id}/redeploy|stop|start
  • GET /api/apps/{id}/logs?lines=200
  • GET /api/deployments?appId=
  • GET/POST /api/agents, DELETE /api/agents/{id} (admin)
  • GET /api/audit-logs (admin), GET /api/server/info

Why not Docker

Each app is an OS process. Crash isolation is provided by the kernel; restart policy + health gating is ~200 lines of Go (see internal/paas/supervisor.go). Builds use the exact native toolchains (uv, bun, npm, elm) already on the VPS — no image build, no registry, no 500 MB image pull per deploy.

Status

MVP: static/bun/elm/uv deploy, stop/start/delete/redeploy, logs, env vars, domains, auto-HTTPS, scoped tokens, audit, CLI, Elm dashboard (in progress). Not yet: cron, backups, rollback UI, multi-server.

License

AGPL-3.0 (same as better-paas).

About

simplest PaaS for deploying VPSs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0