fastly compute publish
Build and deploy a Compute package to a Fastly service.
Syntax
$ fastly compute publish
Options
Key | Required? | Default | Description |
---|---|---|---|
--comment | No | Human-readable comment | |
--dir | No | Project directory to build (default: current directory) | |
--domain | No | The name of the domain associated to the package | |
--env | No | The manifest environment config to use (e.g. 'stage' will attempt to read 'fastly.stage.toml') | |
--include-source | No | Include source code in built package | |
--language | No | Language type | |
--metadata-disable | No | Disable Wasm binary metadata annotations | |
--metadata-filter-envvars | No | Redact specified environment variables from [scripts.env_vars] using comma-separated list | |
--metadata-show | No | Inspect the Wasm binary metadata | |
--package | No | Path to a package tar.gz | |
--package-name | No | Package name | |
--service-id | No | Service ID (falls back to FASTLY_SERVICE_ID, then fastly.toml) | |
--service-name | No | The name of the service | |
--status-check-code | No | Set the expected status response for the service availability check to the root path | |
--status-check-off | No | Disable the service availability check | |
--status-check-path | No | / | Specify the URL path for the service availability check |
--status-check-timeout | No | 120 | Set a timeout (in seconds) for the service availability check |
--version | No | 'latest', 'active', or the number of a specific Fastly service version | |
--timeout | No | Timeout, in seconds, for the build compilation step |
Global options
Key | Required? | Default | Description |
---|---|---|---|
--help | No | Show context-sensitive help. | |
--accept-defaults | No | Accept default options for all interactive prompts apart from Yes/No confirmations | |
--auto-yes | No | Answer yes automatically to all Yes/No confirmations. This may suppress security warnings | |
--debug-mode | No | Print API request and response details (NOTE: can disrupt the normal CLI flow output formatting) | |
--enable-sso | No | Enable Single-Sign On (SSO) for current profile execution (see also: 'fastly sso') | |
--non-interactive | No | Do not prompt for user input - suitable for CI processes. Equivalent to --accept-defaults and --auto-yes | |
--profile | No | Switch account profile for single command execution (see also: 'fastly profile switch') | |
--quiet | No | Silence all output except direct command output. This won't prevent interactive prompts (see: --accept-defaults, --auto-yes, --non-interactive) | |
--token | No | Fastly API token (or via FASTLY_API_TOKEN) | |
--verbose | No | Verbose logging |
Examples
Build and deploy a Compute package to a Fastly service
The fastly compute publish command is a convenience wrapper around the existing build and deploy commands. All flags present on the fastly compute build and fastly compute deploy commands are available to use here.
$ fastly compute publish --accept-defaults
API equivalent
This command internally uses the following Fastly public APIs:
- https://www.fastly.com/documentation/reference/api/services/service#create-service
- https://www.fastly.com/documentation/reference/api/services/service#get-service
- https://www.fastly.com/documentation/reference/api/services/package#get-package
- https://www.fastly.com/documentation/reference/api/services/package#put-package