Skip to main content

nifectl redeploy Command Reference

Redeploy an existing application with a new image or rebuilt source.

Overview​

Use redeploy when you want to push a new version of an already-configured application without re-running nifectl init. It preserves all existing environment variables, regions, and configuration, and supports volume backup and automatic rollback on failure.

nifectl redeploy [flags]

Options​

-a, --app string App name to operate on
-i, --image string Docker image to deploy (e.g. nginx:1.25)
--git-url string Git repository URL to build from
--git-branch string Git branch to build (default: main)
--git-provider string Git provider: github, gitlab, bitbucket (default: github)
--archive-url string S3 archive URL to build from (.zip, .tar.gz)
-e, --env-arg strings Environment variables as NAME=VALUE pairs (repeatable)
--strategy string Deployment strategy (default: rolling)
--skip-volume-safety Skip volume backup and safety checks (faster but risky)
-h, --help Help for redeploy

Global Options​

-t, --access-token string Nife API Access Token
-j, --json JSON output format
-V, --verbose Verbose / debug output

Source Resolution Order​

If no source flag is provided, redeploy falls back to the image currently running on the app:

  1. --image — use a specific Docker image directly
  2. --git-url — build from a Git repository (triggers a remote build)
  3. --archive-url — build from an S3 or HTTP archive
  4. (fallback) — reuse the app's current running image

Examples​

# Redeploy with a new Docker image
nifectl redeploy -a my-app --image nginx:1.25

# Rebuild from GitHub
nifectl redeploy -a my-app --git-url https://github.com/acme/repo --git-branch main

# Redeploy with new environment variables
nifectl redeploy -a my-app --image myorg/app:v2 -e KEY=value

# Canary rollout
nifectl redeploy -a my-app --image myorg/app:v2 --strategy canary

Best Practices​

  • Pin image tags (e.g. myorg/app:sha-abc123) rather than using latest for reproducible deployments.
  • Use --git-branch to target a specific release branch rather than the default main.
  • Avoid --skip-volume-safety in production — volume backups protect against data loss during failed rollouts.

See Also​

Summary​

Nifectl Redeploy makes it simple to push a new version of an existing application without reconfiguring it. Whether you're shipping a new Docker image, rebuilding from Git, or redeploying with updated environment variables, it handles the full rollout with safety checks and live monitoring.