hostess deploy
Deploy all services defined in hostess.yml to the Hostess platform.
Description
Deploy all services defined in your hostess.yml to the Hostess platform. This is the primary command you'll use to get your application running.
For a new project, Hostess can prompt you to create it interactively and select an organization.
The deploy command handles the entire deployment lifecycle:
- Reads your
hostess.ymlconfiguration - Authenticates with the Hostess API
- Creates a new project in interactive mode when needed
- Uploads your source code
- Builds container images
- Deploys services in dependency order
- Shows real-time progress in an interactive TUI
Usage
hostess deploy [flags]Flags
| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--file | -f | string | hostess.yml | Path to hostess.yml config file |
--repo | -r | string | GitHub repo to deploy from (e.g., org/repo) | |
--url | string | URL to a remote hostess.yml file | ||
--env | string | Most recently created environment if omitted (often preview on a new project) | Deploy to a specific environment (e.g., staging, production). Always set --env in CI. | |
--project | -p | string | From hostess.yml | Project name (overrides the name field in hostess.yml) |
--service | -s | string[] | All services | Deploy only selected service(s). Repeatable. |
--no-interactive | bool | false | Run without prompts; useful for CI and scripts | |
--token | string | Auth token (for CI/CD) |
The --file, --repo, and --url flags are mutually exclusive. You can only use one source at a time.
Examples
Deploy from the current directory
The most common usage. Reads hostess.yml from the current directory:
hostess deployDeploying my-app (preview)
Services: api, database, frontend
Deployment ID: dep_abc123
Status: building
Status: starting services
Service database: ready
Service api: ready
Service frontend: ready
Status: complete
✓ Deployment complete (dep_abc123)
api: https://my-app-api-a3x9d2m1.hostess.run
frontend: https://my-app-frontend-k7xm9p2q.hostess.run
→ View deployment: https://hostess.sh/dashboard/org/my-org/projects/proj_abc123/deployments/dep_abc123Deploy from a specific config file
hostess deploy -f ../other-project/hostess.ymlDeploy from a GitHub repository
Deploy image-only services (no build step) directly from a GitHub repository:
hostess deploy -r myorg/myprojectRemote deploy sources are for configurations that reference pre-built images with the image: field. For services with build:, clone the repository and run hostess deploy from the source checkout.
Deploy selected services only
When you only want to update specific services without redeploying everything:
hostess deploy -s api -s webThis is useful for large stacks where you've only changed one or two services. Unchanged services remain running at their current version.
Deploy to a specific environment
hostess deploy --env stagingOverride the project name
hostess deploy --project my-other-projectCI/CD usage with token
In CI/CD pipelines where interactive prompts aren't available:
hostess deploy --token $HOSTESS_TOKEN --no-interactiveOr using an environment variable:
export HOSTESS_TOKEN="pat_abc123..."
hostess deploy --no-interactiveFull CI/CD example
name: Deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Hostess CLI
uses: howl-cloud/setup-hostess@v1
- name: Deploy
run: hostess deploy --no-interactive --env production
env:
HOSTESS_TOKEN: ${{ secrets.HOSTESS_TOKEN }}Deployment Flow
When you run hostess deploy, the following happens:
- Configuration loading — The CLI reads and validates your
hostess.yml - Authentication — Resolves your token from
--tokenflag,HOSTESS_TOKENenv var, or saved login - Project resolution — Finds your project by name, or prompts to create one
- Environment selection — Uses
--envor, if omitted, the most recently created environment (oftenpreviewon a new project) - Source upload — Archives and uploads your source code (for services with
build:configs) - Build — Hostess builds container images for each service
- Deploy — Services are deployed in dependency order
- Health checks — Hostess waits for all services to pass health checks
- URL assignment — Each public service gets a
hostess.runURL
Interactive vs Non-Interactive
In an interactive terminal (TTY), the deploy command shows a rich TUI with real-time status updates for each service. In non-interactive mode (CI/CD, piped output), it shows a simpler text output with deployment ID and final status.
If the project is new in interactive mode, Hostess prompts you to create it and select an organization. In non-interactive mode (--no-interactive), create the project first with hostess projects create <name>.
Cancellation
You can cancel a running deployment by pressing Ctrl+C. Hostess will send a cancellation request to the API and clean up any in-progress resources.