| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
The skills/ directory fully replaces the old Go CLI. Drop all Go
source, build files, planning docs, and the stale SECURITY.md
(which described the old git-user push-deploy model that no longer
exists). Trim .gitignore to match the new tree.
|
| |
|
|
| |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
| |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
| |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
| |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
| |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
| |
Replaces outdated v1 git-push/CLI docs with accurate description of the
Claude skills system. Covers install, quick start, config format, server
layout, and skill reference table.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Extracts server provisioning logic into a proper bash script rather than
ad-hoc SSH commands in skill prose. Mirrors the behavior of the original
`ship host init` Go CLI code exactly — Caddy install, directory structure,
Caddyfile config, all idempotent.
Updates SKILL.md to reference the script instead of inlining commands.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduces a skills/ directory with 8 Claude skills that reimagine ship
as a set of composable, human-driven deployment tools backed by Claude's
reasoning rather than a rigid CLI.
Skills:
- ship-setup: one-time VPS config, saves host to ~/.config/ship/config.json
- ship-status: derives live state from server, no local state file
- ship-env: read/write env vars with merge semantics, never overwrites
- ship-binary: deploy Go binaries with SQLite backup, correct restart behavior
- ship-caddy: manage per-app Caddyfile with validate-before-reload
- ship-service: systemd management and log inspection
- ship-static: rsync static sites with SPA routing support
- ship-deploy: orchestration runbook tying the others together
Also adds SKILLS_PLAN.md documenting the architecture and rationale.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
| | |
|
| |
|
|
|
|
| |
Docker deployments were passing the host port as PORT to the container,
but the port mapping routes traffic to container port. This caused apps
that read PORT from env to listen on the wrong port inside the container.
|
| |
|
|
|
|
|
| |
- Collapse multi-line allocScript to single line (fixes SSH+sudo mangling)
- Scan /etc/ship/ports/* to find highest port in use
- Use max(next_port, highest_used + 1) to prevent collisions
- Fixes issue where stale/missing next_port caused port conflicts
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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)
|
| |\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | |
| |
| |
| |
| | |
Read actual domain from Caddyfile instead of assuming subdomain.
Works for both apps and static sites.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
- Docker container port hardcoded to 80
- ship host init doesn't create local state.json
|
| | |
| |
| |
| |
| | |
Most Docker web containers (nginx, etc.) listen on port 80 internally.
The previous mapping assumed the container listened on the allocated port.
|
| | | |
|
| | |
| |
| |
| |
| | |
Allows specifying a custom domain instead of using the auto-generated
subdomain pattern. Usage: ship . --domain bdw.to
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
- 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
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
- Rename validateName to validateNameV2 to avoid conflict
- Fix host status to print JSON directly (remove unused resp)
Builds successfully now
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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)
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| | |
| |
| |
| |
| |
| |
| |
| | |
- 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
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|