Hubfly spaceDocs
Console

hubfly deploy

hubfly deploy deploys the app in your current directory to Hubfly space. It works for auto-detected projects and Dockerfile-based apps, and it can run interactively or in CI.

Quick Deploy

terminal

$ hubfly login
$ cd my-app
$ hubfly deploy

The interactive flow asks which project and region to use, shows the deployment diff, then asks for confirmation before applying changes.

What hubfly deploy Does

  1. Loads or creates hubfly.build.json.
  2. Runs hubfly-builder to detect framework, build command, run command, ports, and Dockerfile needs.
  3. Builds a Docker image locally on your machine.
  4. Uploads the image archive to the selected Hubfly space region with retryable transfer.
  5. Shows resource, port, volume, env var, healthcheck, and container replacement changes.
  6. Starts the deployment and waits for completion unless --detach is set.

Fresh builder on deploy

Normal deploys check for the latest hubfly-builder release before inspection. Use --builder-version only when you need a pinned builder version for reproducibility.

Flags You Need

FlagUse It For
--project <id|name|new>Deploy to an existing project by ID/name, or create a new project with new.
--region <region>Choose the deployment region. Required for non-interactive new-project deploys.
--yesSkip confirmation prompts after you have reviewed the config. Required for CI.
--config <path>Use a custom hubfly.build.json path or point at another project directory.
--detachReturn after upload and let Hubfly space finish the deployment in the background.
--dockerfile <path>Force Dockerfile mode for this deploy.
--builder-version <tag>Pin a specific hubfly-builder release.
--org <id|slug>Filter project selection to one organization.
--mode smart|replacePreserve unspecified cloud values with smart, or treat the supplied manifest as complete with replace.
--force-newSupersede an active deployment when that conflict is intentional.
--jsonEmit machine-readable plan or session output for automation.

Plan And Monitor A Deploy

You can inspect a server-side change plan without applying it, then monitor or control an accepted session by its build ID. This is useful when CI needs to continue after the terminal process disconnects.

terminal

$ hubfly deploy plan --project my-api --mode smart
$ hubfly deploy status <buildId>
$ hubfly deploy events <buildId>
$ hubfly deploy cancel <buildId>
$ hubfly deploy retry <buildId>
$ hubfly deploy pull --project my-api
CommandBehavior
hubfly deploy planCreates and prints a deployment plan without starting the image upload.
hubfly deploy status <buildId>Prints the session ID, status, phase and error text.
hubfly deploy events <buildId>Prints timestamped phase, status and message events.
hubfly deploy cancel <buildId>Cancels an active pending, building or deploying session.
hubfly deploy retry <buildId>Retries a failed session when the server permits it.
hubfly deploy pullPulls the current cloud container configuration into the local config; review it before deploying.

hubfly.build.json

The CLI can deploy without a committed config file, but keeping hubfly.build.json in your repo makes deployments repeatable.

See the complete hubfly build andhubfly.build.json reference for the schema, every field, validation output, migration and editor workflow.

terminal

$ hubfly build init
$ hubfly build validate
$ hubfly build explain
$ hubfly build edit
CommandPurpose
hubfly build initCreate or refresh hubfly.build.json.
hubfly build validate --jsonValidate the build plan and emit machine-readable output for CI.
hubfly build explainShow what the builder detected and why.
hubfly build editOpen the config in $EDITOR.

Examples

Deploy To An Existing Project

terminal

$ hubfly deploy --project my-api --region eu-1 --yes

Create A New Project

terminal

$ hubfly deploy --project new --region rw-kigali-1 --yes

Deploy With A Dockerfile

terminal

$ hubfly deploy --project my-api --dockerfile ./deploy/Dockerfile --yes

Deploy From CI

terminal

$ HUBFLY_TOKEN=$HUBFLY_TOKEN hubfly deploy --project my-api --region eu-1 --yes --detach

Use A Custom Config File

terminal

$ hubfly deploy --config ./ops/hubfly.build.json --project my-api --yes

Troubleshooting

ProblemFix
CLI asks for login in CISet HUBFLY_TOKEN and use --yes.
New project deploy fails in a scriptPass both --project new and --region <region>.
Wrong Dockerfile is usedPass --dockerfile ./path/Dockerfile or save it with hubfly build init --dockerfile.
Need faster pipeline returnUse --detach after upload.
Need to compare changes without deployingUse hubfly deploy plan and review its operations and warnings.
Deploy is blocked by an active sessionInspect it with hubfly deploy status <buildId>; use --force-new only when superseding it is intentional.
Need support helpCopy the backend trace ID from the CLI error output.
Something unclear or out of date? Emailsupport@hubfly.spaceBack to top