ezgh deploy init [--name n] [--branch b] [flags]Write EZGHDeploy at the root of the checkout: one web service, and a production environment deploying the checked-out branch (or --branch) into your project (--project, EZGH_PROJECT or the profile’s, written as given).
With a Dockerfile at the root, the service is built from it, on the port of its last EXPOSE (or --port, which a Dockerfile with no EXPOSE needs). Without a Dockerfile, the service is built as ezgh deploy detect says, on the port detection finds; when detection can’t tell how, nothing is written.
A Mastra app gets an agents service that may use EZGH Sandboxes, a Postgres database, and a sandbox image for sandbox/Dockerfile and each sandbox/<name>.Dockerfile; with a Chat SDK adapter (@chat-adapter/<platform>) in its dependencies, agents is public at its CDN hostname for the platforms’ webhooks. init then prints the next steps.
An existing EZGHDeploy is replaced only with --force. Every file written is one ezgh deploy validate accepts. Nothing is sent anywhere.
Part of ezgh deploy.
Examples
ezgh deploy init
ezgh deploy init --name shop --branch mainFlags
| Flag | Type | Default | Description |
|---|---|---|---|
--branch |
string | the branch production deploys (default: the one checked out) | |
--force |
boolean | replace an existing EZGHDeploy | |
--name |
string | the stack’s name (default: the repository directory’s) | |
--port |
int | the port the service listens on (default: the Dockerfile’s EXPOSE, or the one detected) |
Inherited from parent commands:
| Flag | Type | Default | Description |
|---|---|---|---|
--dir |
string | . |
the repository’s checkout (any directory inside it) |
--json |
boolean | print JSON, as -o json does |
This command also takes the global flags.