csph launch
deploy a repository for the first time, asking only for what it needs
🚀 Deploy a repository for the first time.
launch takes you from a repository to a running service in one command.
It reads the repository through your Git connection, says what it builds as
(a Dockerfile, a language runtime, or a static site) and which port it uses,
then asks only for the settings the app can't start without:
- a secret is typed with the input hidden, and is never printed;
- a setting that can be generated (an app's secret key) is generated for you on the server;
- a database, cache or queue the app uses can be created and connected.
Settings the app reads but doesn't need to start are listed, not asked.
It then deploys with the same engine as apply, and waits for the service
to be running.
Give it a folder in a checkout (default: the current folder) or a
repository URL. In a checkout, the branch checked out and the folder you're
in are what deploy; --branch and --root change them.
With no terminal, or with --no-input, nothing is asked: settings come
from --env-file, and --generate and --create-data-services say yes to
those offers. Settings in --env-file the app doesn't appear to read are
skipped and listed; --include-extra-env adds them as secrets. If a
required setting still has no value, nothing is deployed and launch
exits 16, naming every missing setting.
Exit codes: 0 running, 1 the deploy failed, 16 refused before deploying.
Usage​
csph launch [path | repository-url] [flags]
Options​
Command Specific​
Formatting​
For more information about formatting options, see Formatting.
Inherited​
Examples​
# deploy the repository you're in, answering what it asks
> csph launch
# a repository by URL, a folder inside it, a service name
> csph launch https://github.com/acme/shop --root services/api --name shop-api
# in CI: settings from a file, generate what can be, create the database
> csph launch --no-input --env-file deploy.env --generate --create-data-services
See also​
- csph — ComputeSphere CLI
- csph auth — sign in, sign out, and manage API tokens
- csph apply — apply a computesphere.yaml manifest
- csph deploy — deploy an app in one shot
- 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 git — list git connections and the repositories they can clone
- 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 volumes — list SphereFiles volumes
- csph files — copy files to and from SphereFiles volumes
- csph teams — manage teams
- csph activities — view activities
- csph secret-source — manage the account's secret managers and where they can be used
- 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