Skip to content

Rollback and operations

Tarsail keeps operations close to Docker Compose. The commands are wrappers around a stable remote layout and predictable Compose invocations.

Show remote Compose status:

Terminal window
tarsail status

With explicit config and key:

Terminal window
tarsail --config tarsail.production.yml --identity-file ~/.ssh/my-app-deploy-key status

This runs a remote command equivalent to:

Terminal window
cd /opt/my-app
docker compose -p my-app --env-file current/.tarsail.env --env-file shared/.env -f current/compose.yaml ps

Show recent logs:

Terminal window
tarsail logs

Show logs for one service:

Terminal window
tarsail logs web

Control line count:

Terminal window
tarsail logs --tail 500 web

Follow logs:

Terminal window
tarsail logs -f web

--tail must be between 1 and 10000.

Service names may contain letters, numbers, dot, underscore, and hyphen.

Roll back to the previous release:

Terminal window
tarsail rollback

Rollback:

  • lists releases under <target.path>/releases;
  • detects the current release from the current symlink;
  • selects the previous release;
  • reloads bundled images from the previous release;
  • updates current;
  • runs docker compose up -d;
  • prints status.

Rollback does not ask for confirmation in Phase 0.

Rollback does not restore:

  • databases;
  • Docker volumes;
  • bind-mounted directories outside current;
  • shared/ files;
  • DNS;
  • certificates;
  • cloud firewall rules;
  • external service state.

If a failed deployment ran a destructive migration, tarsail rollback cannot undo the database change. Keep migration safety and backup policy in the application deployment plan.

Preview and confirm old release deletion:

Terminal window
tarsail prune

Skip confirmation:

Terminal window
tarsail prune --yes

Global --yes also applies:

Terminal window
tarsail --yes prune

Prune keeps the current release and keeps the newest releases according to deploy.keep_releases.

Prune deletes old release directories under:

<target.path>/releases/

It does not delete:

  • the current release;
  • incoming/ bundles;
  • shared/;
  • Docker images;
  • Docker volumes;
  • databases;
  • files outside the Tarsail target path.

When debugging, it is often useful to inspect the remote layout:

Terminal window
cd /opt/my-app
ls -la
ls -la releases
readlink current
docker compose -p my-app --env-file current/.tarsail.env --env-file shared/.env -f current/compose.yaml ps

To see the active release manifest:

Terminal window
cat current/manifest.json

To confirm the release ID Compose received:

Terminal window
cat current/.tarsail.env

For routine maintenance:

  • run doctor after changing server access, Docker installation, config paths, or secret provisioning;
  • run status after every deployment;
  • inspect service logs before rollback;
  • keep deploy.keep_releases high enough for your rollback needs;
  • prune only after confirming recent releases are healthy;
  • keep database backup and migration strategy outside Tarsail;
  • document application-specific ports, health checks, and recovery steps.