Skip to content

ezgh run deploy

Create a service, or deploy a new revision of it.

Updated View as Markdown
ezgh run deploy <name> --image <ref> [flags]

Deploy an image as the service named <name>: it’s created when the project has none of that name, and otherwise gets a new revision with the given flags over its latest revision’s settings. A tag is resolved again on every deploy, so deploying the same tag picks up what was pushed to it. ezgh waits until the revision is ready (or failed), then prints the service and its URL (when it has one).

--env and --env-file replace the whole environment: give every variable the service needs. Values are never shown again. Without them, the environment is kept. --bot gives the service’s code a Bot’s short-lived credentials (it needs permission to pass the Bot); --bot none takes it away.

A new revision takes all the traffic when the service’s traffic is on its latest ready revision (the default); see ezgh run traffic to split it.

Part of ezgh run.

Examples

ezgh run deploy web --image <id>.registry.ezghcloud.com/acme/web:1
ezgh run deploy api --image <id>.registry.ezghcloud.com/acme/api:2 --max-concurrency 200 --min-instances 1 --env MODE=prod

Flags

Flag Type Default Description
--access string public (anyone with the URL) or authenticated (an EZGH API key or Bot key with run.services.invoke)
--bot string a Bot (bot_…) its code gets short-lived credentials for, or none to take it away
--disk-gib int its disk, 1 to 50 GiB (default 5)
--egress string where its code may connect: internet, vpc (with --subnet) or none (default internet)
--env string, repeatable an environment variable, KEY=VALUE; repeat for more
--env-file string a file of KEY=VALUE lines
--image string the image, as <registry host>/<repository>[:tag|@digest] in this project’s registry (required)
--max-concurrency int requests one instance serves at once, 1 to 1000 (default 80)
--max-instances int the most instances, 1 to 100 (default 10)
--memory-mib int 512, 1024, 2048, 4096, 8192 or 16384 (default 512)
--min-instances int instances kept running, 0 to 100 (default 0)
--port int the port its server listens on (default 8080)
--request-timeout int seconds a request may take, 1 to 3600 (default 300)
--startup-timeout int seconds a new instance has to listen on its port, 1 to 3600 (default 240)
--subnet string the VPC subnet (sbn_…) for --egress vpc
--vcpus int 1, 2, 4 or 8 (default 1)
--wait-timeout duration 15m0s how long to wait for the revision

This command also takes the global flags.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close