Skip to content

Ship and Rebuild

Griffen Fargo edited this page Jun 18, 2026 · 1 revision

Ship and Rebuild

Two commands for the "edit locally, deploy remotely" workflow. ship handles the full git-to-deploy cycle in one step; rebuild builds Docker images on the target host.

Since: v0.22.0

Ship

Commit, push, and rebuild on the remote VPS in a single command:

strut my-app ship --env prod
strut my-app ship --env prod -m "fix dashboard layout"
strut my-app ship --env prod --no-commit          # just push + rebuild
strut my-app ship --env prod --no-push            # just remote rebuild
strut my-app ship --env prod --dry-run

What It Does

  1. git add -A && git commit -m "<message>" (skippable)
  2. git push origin <branch> (skippable)
  3. SSH to VPS: cd <deploy_dir> && git pull && strut <stack> rebuild --env <name>

Options

Flag Description
--env <name> Environment (required)
--message <msg> / -m <msg> Commit message (default: update <stack>)
--no-commit Skip the commit step
--no-push Skip the push step (just remote rebuild)
--no-cache Pass --no-cache to the remote rebuild
--dry-run Show execution plan without running

When to Use

  • Rapid iteration on remote-only services (not buildable locally)
  • Quick fixes that don't need a full release pipeline
  • When you want commit + deploy as one atomic action

Rebuild

Build Docker images on the target host and deploy. Unlike deploy (which pulls pre-built images), rebuild runs docker compose build on the VPS:

strut my-app rebuild --env prod
strut my-app rebuild --env prod --no-cache
strut my-app rebuild --env prod --pull
strut my-app rebuild --env prod --dry-run

Options

Flag Description
--env <name> Environment (required)
--no-cache Build without Docker cache
--pull Pull base images before building
--dry-run Show execution plan without running

When to Use

  • Stacks that build from source (not a pre-built registry image)
  • When you need to rebuild with updated dependencies
  • After changing a Dockerfile

Ship vs Release vs Deploy

Command Where It Runs Git Flow Builds? Migrations?
ship VPS (via SSH) commit + push + pull Yes (rebuild) No
release VPS (via SSH) pull only No (pulls images) Yes
deploy Local (or VPS if SSH'd in) None No (pulls images) No
rebuild VPS (via SSH) None Yes (docker build) No

Choose:

  • release for production deploys with migrations and health gates
  • ship for quick iterative deploys of source-built services
  • rebuild when you just need to rebuild images (no git flow)
  • deploy for simple image-pull deploys

Clone this wiki locally