aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Clean up obsolete docs and binariesClawd9 hours6-686/+1
| | | | | | | | | Removed: - GIT_AND_GOMOD_PLAN.md (old planning) - PLAN_v0.2.0.md (old planning) - PROGRESS.md (v2 progress tracking, complete) - TODO.md (all items fixed) - ship-new binary (added to gitignore)
* Merge agent-mode: v2 rewrite completeClawd9 hours40-2828/+2919
|\ | | | | | | | | | | | | | | | | | | - Removed all v1 code (-2800 lines) - Simplified state to just default_host + base_domain - Atomic port allocation via flock - --container-port flag for Docker - Custom domains shown in ship list - Caddyfiles preserved on redeploy - JSON output by default, --pretty for humans
| * Mark custom Caddyfile support as fixedagent-modeClawd9 hours1-10/+5
| |
| * Preserve existing Caddyfiles on redeployClawd9 hours2-35/+43
| | | | | | | | | | | | | | Don't overwrite Caddyfile if it already exists. This preserves manual customizations (NIP-05 routes, custom headers, etc.). First deploy generates Caddyfile, subsequent deploys leave it alone.
| * Mark custom domains in list as fixedClawd9 hours1-3/+4
| |
| * Show custom domains in ship list and statusClawd9 hours2-3/+24
| | | | | | | | | | Read actual domain from Caddyfile instead of assuming subdomain. Works for both apps and static sites.
| * Update TODO: mark port collision and container port as fixedClawd9 hours1-27/+15
| |
| * Fix port collision bug, add --container-port flagClawd9 hours5-26/+40
| | | | | | | | | | | | | | | | | | | | | | | | Port allocation: - Use atomic flock-based allocation via /etc/ship/next_port - Prevents race conditions when multiple deploys run concurrently - Each app still gets its port stored in /etc/ship/ports/<name> Docker container port: - Add --container-port flag (default 80) - Template now uses {{.ContainerPort}} instead of hardcoded 80 - Supports containers that listen on 8080, 3000, etc.
| * Mark TODO #2 as fixedClawd9 hours1-19/+6
| |
| * Remove v1 code, simplify state to just base_domainClawd9 hours26-2837/+9
| | | | | | | | | | | | | | | | | | - 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
| * Update TODO #2: simplify local state, remove v1 cruftClawd9 hours1-4/+8
| |
| * Add TODO: support custom Caddyfile in repoClawd22 hours1-0/+14
| |
| * Add TODOs: show custom domains in list, fix port collision bugClawd22 hours1-0/+14
| |
| * Add TODO.md with known limitationsClawd23 hours1-0/+41
| | | | | | | | | | - Docker container port hardcoded to 80 - ship host init doesn't create local state.json
| * Fix Docker port mapping: map host port to container port 80Clawd24 hours1-1/+1
| | | | | | | | | | Most Docker web containers (nginx, etc.) listen on port 80 internally. The previous mapping assumed the container listened on the allocated port.
| * Add --domain flag to v2 CLI flagsClawd24 hours2-0/+1
| |
| * Add --domain flag support to v2 deployClawd24 hours2-2/+9
| | | | | | | | | | Allows specifying a custom domain instead of using the auto-generated subdomain pattern. Usage: ship . --domain bdw.to
| * Add source link to website footerClawd28 hours1-0/+1
| |
| * Remove .claude from tracking, update .gitignoreClawd28 hours2-18/+3
| |
| * Add website/ directory with landing pageClawd28 hours2-0/+220
| |
| * feat: auto-generate SSH key and guide auth setup in host initClawd43 hours1-2/+82
| | | | | | | | | | | | - ensureSSHKey() generates ed25519 key if none exists - If SSH auth fails, returns JSON with pubkey and setup instructions - Provides ssh-copy-id command for easy key deployment
| * fix: set ownership before rsync for Docker deployClawd46 hours1-0/+7
| |
| * fix: split sudo commands to fix ownership for rsync uploadClawd46 hours1-2/+8
| |
| * fix: Caddy install permission issue with gpg dearmorClawd46 hours1-3/+4
| |
| * fix: make ErrorResponse implement error interface for v1 compatClawd46 hours1-0/+3
| |
| * fix: resolve build errors with v1 codeClawd46 hours2-13/+10
| | | | | | | | | | | | | | - Rename validateName to validateNameV2 to avoid conflict - Fix host status to print JSON directly (remove unused resp) Builds successfully now
| * docs: update progress with all commit hashesClawd46 hours1-0/+4
| |
| * feat(v2): wire up v2 as default interfaceClawd46 hours2-4/+20
| | | | | | | | | | | | | | | | - main.go: v2 JSON interface is now default - Set SHIP_V1=1 to use legacy human-formatted output - initV2() called before rootV2Cmd.Execute() v2 rebuild complete - ready for testing
| * feat(v2): implement list, status, logs, remove commandsClawd46 hours3-48/+351
| | | | | | | | | | | | | | | | | | | | | | - commands_v2.go: all subcommand implementations - list: enumerates deploys from /etc/ship/ports and /var/www - status: shows deploy details (type, port, running, TTL) - logs: fetches journalctl logs (or Caddy logs for static) - remove: full cleanup of all artifacts (service, caddy, files, docker) - All commands output JSON with proper error codes All core v2 commands now implemented
| * feat(v2): implement ship host init with JSON outputClawd46 hours4-27/+380
| | | | | | | | | | | | | | | | | | | | | | | | - 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): implement deploy flowsClawd46 hours3-52/+376
| | | | | | | | | | | | | | | | | | | | | | | | - deploy_impl_v2.go: full implementations for static, docker, binary deploys - Static: rsync + Caddyfile generation + reload - Docker: rsync + build + systemd unit + env file + Caddyfile - Binary: scp + systemd unit + service user + env file + Caddyfile - Port allocation: server-side in /etc/ship/ports/ - TTL: server-side in /etc/ship/ttl/ - Health checks: HTTP GET with 30s retry loop All deploy types now functional (pending Go compilation test)
| * feat(v2): add CLI structure and deploy orchestrationClawd46 hours3-10/+419
| | | | | | | | | | | | | | | | | | | | | | - cmd/ship/root_v2.go: new CLI with ship [PATH] as primary command - cmd/ship/deploy_v2.go: deploy orchestration with context struct - Placeholder implementations for static/docker/binary deploys - Placeholder subcommands (list, status, logs, remove, host) - Support for --name, --health, --ttl, --env flags - SHIP_PRETTY env var support Next: implement actual deploy flows
| * feat(v2): add output and detect packagesClawd46 hours3-0/+358
| | | | | | | | | | | | | | | | - 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
| * docs: add comprehensive technical specificationClawd46 hours1-0/+499
| |
| * docs: rewrite as agent-first tool, humans are afterthoughtClawd47 hours1-172/+147
| |
| * docs: rename to SHIP_V2.md, JSON output is default not a flagClawd47 hours2-34/+46
| |
| * docs: add agent mode design documentClawd47 hours1-0/+271
|/
* fix: use project directory for static site .ship/ folderClawd47 hours1-4/+7
| | | | | | | | | | Previously, deployStatic() checked for .ship/Caddyfile in the current working directory instead of the project directory (opts.Dir). This caused stale Caddyfiles from previous deployments to be reused when deploying multiple static sites from the same working directory. Now .ship/ is created inside the project directory, so each site maintains its own configuration.
* gitignorebndw48 hours1-0/+1
|
* random design filesbndw48 hours2-0/+586
|
* Add backwards compatibility for existing binary deploymentsbndw3 days1-7/+11
| | | | | | Check if .ship files exist before reading them. If they don't exist, generate them even on updates. This provides automatic migration for deployments created before the .ship/ directory change.
* Store deployment configs locally for binary deploymentsbndw3 days2-36/+94
| | | | | | | | | | | | | | For binary and static deployments, .ship/service and .ship/Caddyfile are now written to the local working directory (similar to git deployments) instead of being regenerated on every deployment. - On initial deployment, create local .ship/ directory with generated configs - On subsequent deployments, upload from local .ship/ files - Caddyfile is never regenerated, preserving custom routes - Systemd service is regenerated only when --memory, --cpu, or --args change This prevents custom Caddyfile routes from being overwritten and makes binary deployment workflow consistent with git deployment workflow.
* Add cgit web interface for browsing reposbndw3 days4-168/+151
| | | | | | | | | | | | 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
* Rewrite README and add SECURITY.mdbndw7 days2-143/+262
| | | | | | Document both deployment modes (git push and direct), all commands, architecture, VPS file layout, and vanity imports. Add SECURITY.md covering threat model, mitigations, and known gaps.
* Remove --module flag, add --public, make hooks smarterbndw7 days3-55/+96
| | | | | | | | | 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.directorybndw7 days12-7/+84
| | | | | | | | | | - 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
* Fix Docker apt source write permission in host initbndw9 days1-1/+1
| | | | | The pipe caused only echo to run as sudo while tee had no privileges. Wrap in sh -c so the redirect runs as root.
* Add git-centric deployment with Docker builds and vanity importsbndw9 days12-35/+750
| | | | | | | | | | | | | | | 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-253-679/+682
| | | | | | | 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.