summaryrefslogtreecommitdiffstats
path: root/internal/state
diff options
context:
space:
mode:
authorbndw <ben@bdw.to>2026-02-08 12:32:59 -0800
committerbndw <ben@bdw.to>2026-02-08 12:32:59 -0800
commita8ad8e934d15d2bf84f942414a89af1d2691adbc (patch)
tree82e6765c9d35968b27ac7ee17f5c201a421dc1d3 /internal/state
parentaf109c04a3edd4dcd4e7b16242052442fb4a3b24 (diff)
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 <name>` command to create bare repos and .ship/ config - Add `ship deploy <name>` 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
Diffstat (limited to 'internal/state')
-rw-r--r--internal/state/state.go8
1 files changed, 5 insertions, 3 deletions
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 {
17type Host struct { 17type Host struct {
18 NextPort int `json:"next_port"` 18 NextPort int `json:"next_port"`
19 BaseDomain string `json:"base_domain,omitempty"` 19 BaseDomain string `json:"base_domain,omitempty"`
20 GitSetup bool `json:"git_setup,omitempty"`
20 Apps map[string]*App `json:"apps"` 21 Apps map[string]*App `json:"apps"`
21} 22}
22 23
23// App represents a deployed application or static site 24// App represents a deployed application or static site
24type App struct { 25type App struct {
25 Type string `json:"type"` // "app" or "static" 26 Type string `json:"type"` // "app", "static", "git-app", or "git-static"
26 Domain string `json:"domain"` 27 Domain string `json:"domain"`
27 Port int `json:"port,omitempty"` // only for type="app" 28 Port int `json:"port,omitempty"` // only for type="app" or "git-app"
28 Env map[string]string `json:"env,omitempty"` // only for type="app" 29 Repo string `json:"repo,omitempty"` // only for git types, e.g. "/srv/git/foo.git"
30 Env map[string]string `json:"env,omitempty"` // only for type="app" or "git-app"
29 Args string `json:"args,omitempty"` // only for type="app" 31 Args string `json:"args,omitempty"` // only for type="app"
30 Files []string `json:"files,omitempty"` // only for type="app" 32 Files []string `json:"files,omitempty"` // only for type="app"
31 Memory string `json:"memory,omitempty"` // only for type="app" 33 Memory string `json:"memory,omitempty"` // only for type="app"