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:
--image— use a specific Docker image directly--git-url— build from a Git repository (triggers a remote build)--archive-url— build from an S3 or HTTP archive- (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 usinglatestfor reproducible deployments. - Use
--git-branchto target a specific release branch rather than the defaultmain. - Avoid
--skip-volume-safetyin production — volume backups protect against data loss during failed rollouts.
See Also​
nifectl deploy– Full deploy with build from sourcenifectl status– Check current deployment statusnifectl releases– View release historynifectl– The Nife CLI home command
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.