From a8ad8e934d15d2bf84f942414a89af1d2691adbc Mon Sep 17 00:00:00 2001 From: bndw Date: Sun, 8 Feb 2026 12:32:59 -0800 Subject: Add git-centric deployment with Docker builds and vanity imports New deployment model where projects start with a git remote on the VPS. Pushing to the remote triggers automatic docker build and deploy via post-receive hooks. The base domain serves Go vanity imports and git HTTPS cloning via Caddy + fcgiwrap. - Add `ship init ` command to create bare repos and .ship/ config - Add `ship deploy ` command for manual rebuilds - Extend `ship host init --base-domain` to set up Docker, git user, fcgiwrap, sudoers, and vanity import infrastructure - Add git-app and git-static types alongside existing app and static - Update remove, status, logs, restart, list, and config-update to handle new types --- internal/state/state.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'internal/state') diff --git a/internal/state/state.go b/internal/state/state.go index 38657cb..324fd34 100644 --- a/internal/state/state.go +++ b/internal/state/state.go @@ -17,15 +17,17 @@ type State struct { type Host struct { NextPort int `json:"next_port"` BaseDomain string `json:"base_domain,omitempty"` + GitSetup bool `json:"git_setup,omitempty"` Apps map[string]*App `json:"apps"` } // App represents a deployed application or static site type App struct { - Type string `json:"type"` // "app" or "static" + Type string `json:"type"` // "app", "static", "git-app", or "git-static" Domain string `json:"domain"` - Port int `json:"port,omitempty"` // only for type="app" - Env map[string]string `json:"env,omitempty"` // only for type="app" + Port int `json:"port,omitempty"` // only for type="app" or "git-app" + Repo string `json:"repo,omitempty"` // only for git types, e.g. "/srv/git/foo.git" + Env map[string]string `json:"env,omitempty"` // only for type="app" or "git-app" Args string `json:"args,omitempty"` // only for type="app" Files []string `json:"files,omitempty"` // only for type="app" Memory string `json:"memory,omitempty"` // only for type="app" -- cgit v1.2.3