| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| |
|
|
|
| |
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
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
| |
The pipe caused only echo to run as sudo while tee had no
privileges. Wrap in sh -c so the redirect runs as root.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
| |
Show a ship logo in CLI help and explain how ship works -
SSH-only deployment with no agents or containers required.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
- 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
|
| |
|
|
|
|
|
| |
- Commands now use host subcommand (deploy host init, update, ssh, status)
- Remove --host flag from examples (default host set on init)
- Update env commands to new subcommand syntax
- Simplify configuration section
|
| |
|
|
|
| |
Prompts user to reboot when required after apt upgrade completes.
Both prompts now default to yes for a more turnkey experience.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Replace custom switch-based routing with Cobra for cleaner command
hierarchy. Reorganize commands into logical groups:
- Root command handles deployment (--binary, --static, --domain, etc.)
- App management at top level: list, logs, status, restart, remove
- env subcommand group: list, set, unset
- host subcommand group: init, status, update, ssh
- Standalone: ui (renamed from webui), version
Add version command with ldflags support for build info.
|
| |
|
|
|
|
| |
- vps: Show server health (uptime, load, memory, disk, services)
- vps-update: Run apt update && upgrade with streaming output
- vps-ssh: Open interactive SSH session to default/specified host
|
| |
|
|
|
|
|
| |
- Remove "deploy" subcommand, deploy is now the default action
- Require --binary flag explicitly (no auto-discovery)
- Add "rm" as alias for "remove"
- Update help text
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
Static sites now default to using the domain as the name instead of
the source directory basename, preventing conflicts when multiple
sites use the same directory name (e.g., dist).
Also fixes .gitignore to not exclude cmd/deploy/ directory.
|
| | |
|