summaryrefslogtreecommitdiffstats
path: root/cmd/ship/root.go
Commit message (Collapse)AuthorAgeFilesLines
* Remove v1 code, simplify state to just base_domainClawd114 min.1-97/+0
| | | | | | | | | - Delete all v1 commands (deploy, init, list, status, remove, etc.) - Delete v1 env/ and host/ subcommand directories - Simplify state.go: remove NextPort, Apps, AllocatePort, etc. - Local state now only tracks default_host + base_domain per host - Ports and deploys are tracked on the server (/etc/ship/ports/) - host init now creates minimal state.json
* Add git-centric deployment with Docker builds and vanity importsbndw9 days1-0/+2
| | | | | | | | | | | | | | | 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
* Move deploy implementation to deploy.gobndw2026-01-251-587/+84
| | | | | | | Restructure CLI files to follow idiomatic cobra layout: - main.go: minimal entry point - root.go: command definition, flags, and subcommand wiring - deploy.go: all deploy implementation
* Preserve existing config when updating apps and static sitesbndw2026-01-251-180/+215
| | | | | | | | | | | | | | | Previously, updating an app or static site without specifying all flags would clear existing configuration (e.g., custom domains would be lost if --domain wasn't provided on update). Now all config is merged in runDeploy before calling deploy functions: - Load state once instead of 2-3 times - Check for existing app once to determine create vs update - Build merged DeployOptions with existing config + CLI overrides - Deploy functions receive fully-merged config and just execute This ensures existing configuration is preserved unless explicitly overridden by CLI flags.
* Refactor deploy functions to use DeployOptions structbndw2026-01-251-84/+107
|
* Add CPU and memory limits for appsbndw2026-01-251-4/+134
| | | | | | | | | | | | Adds --memory and --cpu flags to set systemd resource limits: ship --binary ./app --memory 512M --cpu 100% Also adds config update mode - use --name without --binary to update an existing app's config without redeploying the binary: ship --name myapp --cpu 50% ship --name myapp --memory 256M --env DEBUG=true Limits are stored in state and preserved on redeploy.
* Add auto-generated subdomain featurebndw2026-01-241-15/+48
| | | | | | | | | | | | | When a base domain is configured on a host (e.g., apps.example.com), deployments automatically get a subdomain ({name}.apps.example.com). Custom --domain can still be provided to route both domains. - Add BaseDomain field to Host state - Add --base-domain flag to host init - Add 'ship host set-domain' command to update base domain - Update deploy flow to auto-generate subdomains - Fix error display (errors were being silently swallowed) - Remove placeholder email from Caddyfile template
* Rename project from deploy to shipbndw2026-01-241-0/+377
- Rename module to github.com/bdw/ship - Rename cmd/deploy to cmd/ship - Update all import paths - Update config path from ~/.config/deploy to ~/.config/ship - Update VPS env path from /etc/deploy to /etc/ship - Update README, Makefile, and docs