summaryrefslogtreecommitdiffstats
path: root/internal
Commit message (Collapse)AuthorAgeFilesLines
* fix: make ErrorResponse implement error interface for v1 compatClawd36 hours1-0/+3
|
* feat(v2): implement ship host init with JSON outputClawd36 hours1-1/+2
| | | | | | | | | | | | - host_v2.go: full host initialization with JSON responses - Installs Caddy, Docker on Ubuntu/Debian - Creates /etc/ship/{env,ports,ttl} directories - Installs TTL cleanup timer (hourly systemd timer) - Cleanup script removes expired deploys completely - Preserves git deploy setup functionality (optional) - Added ErrInvalidArgs error code Critical 'host init' functionality preserved for v2
* feat(v2): add output and detect packagesClawd36 hours2-0/+327
| | | | | | | | - internal/output: JSON response types, error codes, exit codes, pretty output - internal/detect: auto-detection of project type (static/docker/binary) - PROGRESS.md: track rebuild progress Foundation for agent-first JSON interface per SPEC.md
* Add cgit web interface for browsing reposbndw3 days1-1/+90
| | | | | | | | | | | | Adds cgit as a web frontend for browsing git repositories. Visiting the base domain now shows a cgit repo index with trees, commits, diffs, and blame views. Public repos (marked with git-daemon-export-ok) are browsable and cloneable over HTTPS. - Install cgit during host init - Configure cgit with dark theme and base domain integration - Add cgit CGI handler to base domain Caddyfile - Update README to emphasize git-centric workflow with cgit frontend
* Remove --module flag, add --public, make hooks smarterbndw6 days1-7/+20
| | | | | | | | | Drop git-module type — the post-receive hook now checks for a Dockerfile before building, so repos without one simply skip deploy on push. This covers Go modules and libraries that only need vanity imports. Add --public flag to ship init for per-repo HTTPS clone visibility. Show visibility column in ship list.
* Harden security: name validation, scoped sudoers, safe.directorybndw6 days1-0/+13
| | | | | | | | | | - Add ValidateName() enforcing ^[a-z][a-z0-9-]{0,62}$ on all entry points - Tighten sudoers to restrict cp sources/destinations and chown targets - Scope git safe.directory to www-data user only (preserves CVE-2022-24765) - Add www-data to git group and caddy to www-data group for fcgiwrap - Fix vanity import template to use orig_uri placeholder - Restart (not reload) services after group changes - Add name validation to env subcommands and deploy_cmd
* Add git-centric deployment with Docker builds and vanity importsbndw9 days2-3/+173
| | | | | | | | | | | | | | | 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
* Add CPU and memory limits for appsbndw2026-01-252-5/+13
| | | | | | | | | | | | 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-2/+3
| | | | | | | | | | | | | 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-4/+4
| | | | | | | | | - 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
* Move default host from config file to state.jsonbndw2026-01-232-66/+12
| | | | | | | | | Instead of a separate ~/.config/deploy/config file, the default host is now stored as default_host in state.json. This simplifies the config and keeps all state in one place. The init command now automatically sets the default host if none is configured.
* fixed logs -fbndw2025-12-281-0/+36
|
* filesbndw2025-12-282-2/+4
|
* initbndw2025-12-284-0/+650