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
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
- Loads or creates
hubfly.build.json. - Runs
hubfly-builderto detect framework, build command, run command, ports, and Dockerfile needs. - Builds a Docker image locally on your machine.
- Uploads the image archive to the selected Hubfly space region with retryable transfer.
- Shows resource, port, volume, env var, healthcheck, and container replacement changes.
- Starts the deployment and waits for completion unless
--detachis set.
Fresh builder on deploy
hubfly-builder release before inspection. Use --builder-version only when you need a pinned builder version for reproducibility.Flags You Need
| Flag | Use 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. |
--yes | Skip 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. |
--detach | Return 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|replace | Preserve unspecified cloud values with smart, or treat the supplied manifest as complete with replace. |
--force-new | Supersede an active deployment when that conflict is intentional. |
--json | Emit 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
| Command | Behavior |
|---|---|
hubfly deploy plan | Creates 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 pull | Pulls 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
| Command | Purpose |
|---|---|
hubfly build init | Create or refresh hubfly.build.json. |
hubfly build validate --json | Validate the build plan and emit machine-readable output for CI. |
hubfly build explain | Show what the builder detected and why. |
hubfly build edit | Open the config in $EDITOR. |
Examples
Deploy To An Existing Project
terminal
Create A New Project
terminal
Deploy With A Dockerfile
terminal
Deploy From CI
terminal
Use A Custom Config File
terminal
Troubleshooting
| Problem | Fix |
|---|---|
| CLI asks for login in CI | Set HUBFLY_TOKEN and use --yes. |
| New project deploy fails in a script | Pass both --project new and --region <region>. |
| Wrong Dockerfile is used | Pass --dockerfile ./path/Dockerfile or save it with hubfly build init --dockerfile. |
| Need faster pipeline return | Use --detach after upload. |
| Need to compare changes without deploying | Use hubfly deploy plan and review its operations and warnings. |
| Deploy is blocked by an active session | Inspect it with hubfly deploy status <buildId>; use --force-new only when superseding it is intentional. |
| Need support help | Copy the backend trace ID from the CLI error output. |