deploy
deploy an app in one shot
🚀 Deploy an app in one shot.
deploy is the ship verb: it is a thin skin over apply, so it uses the exact
same engine — it posts a computesphere.yaml manifest to the server, then waits
for the new service to reach Running and prints its URL (like fly deploy).
It resolves what to deploy from one of three sources, in this order:
--image <ref>— a prebuilt image.deploysynthesizes a one-service manifest (aweb-serviceon--port, default 8080) and applies it. The service name is derived from the image (ghcr.io/me/api:v1→api); override it with--name. Use--writeto also save the synthesizedcomputesphere.yamlto the current directory.--file <path>— apply an explicit manifest.- otherwise — a
computesphere.yaml(or.yml) in the current directory.
If none of these resolve, deploy errors instead of guessing.
A private image needs registry credentials: pass --registry-username,
--registry-password, and --registry-url together (all three are required;
--image-provider defaults to docker). The synthesized manifest then carries
image_type: private plus the credentials — for that deploy only. Credentials
are never echoed, and --write refuses to save them to disk: feed the password
from an environment variable or CI secret instead of typing it inline.
Building from local source (--build .) or a git URL is not available yet.
NOTE (breaking change): deploy is now the ship verb. It used to be an alias
for the deployments management group — that alias has been removed. Use
csph deployments (or deployment / deploys) for deployment management.
This command supports reading input from a file.
Files can be supplied via the --file flag or piped into the command.
Example of file structure
{}
Usage​
csph deploy [flags]
Options​
Command Specific​
Formatting​
For more information about formatting options, see Formatting.
Inherited​
Examples​
# deploy the computesphere.yaml in the current directory
> csph deploy
# deploy a prebuilt image as a one-service web app
> csph deploy --image ghcr.io/me/api:v1
# ...on a custom port, with an explicit service name
> csph deploy --image ghcr.io/me/api:v1 --name my-api --port 3000
# synthesize and save computesphere.yaml, then deploy
> csph deploy --image ghcr.io/me/api:v1 --write
# deploy a private image (password from an env var / CI secret — never inline)
> csph deploy --image registry.example.com/me/api:v1 \
--registry-url https://registry.example.com \
--registry-username ci-bot \
--registry-password "$REGISTRY_PASSWORD"
# deploy an explicit manifest
> csph deploy --file ./computesphere.yaml
# a computesphere.yaml that builds from source instead of a prebuilt image
> cat computesphere.yaml
version: "2"
services:
- name: api
type: web-service
build_source: git
runtime_type: docker
git_url: https://github.com/acme/api
branch: main
dockerfile: ./Dockerfile
build_args:
NODE_ENV: production
env_vars:
LOG_LEVEL: info
port: 8000
> csph deploy
See also​
- csph — ComputeSphere CLI
- csph auth — sign in, sign out, and manage API tokens
- csph apply — apply a computesphere.yaml manifest
- csph context — show your active account, project, and environment
- csph import — import external config into a computesphere.yaml manifest
- csph accounts — manage accounts
- csph projects — manage projects
- csph environments — manage environments
- csph services — manage services
- csph deployments — manage deployments
- csph logs — view logs for a service or deployment
- csph alerts — manage alerts
- csph db — manage SphereDB databases
- csph cache — manage SphereCache caches
- csph queue — manage SphereQueue queues
- csph teams — manage teams
- csph activities — view activities
- csph profile — manage your profile
- csph configuration — Configuration via environment variables
- csph formatting — Output formatting
- csph exit-codes — Exit codes used by ComputeSphere
- csph completion — Generate the autocompletion script for the specified shell