CLI deploy options
Use these options to help deploy your tasks to Trigger.dev.
Run the command like this:
This will fail in CI if any version mismatches are detected. Ensure everything runs locally first using the dev command and don’t bypass the version checks!
It performs a few steps to deploy:
- Optionally updates packages when running locally.
- Compiles and bundles the code.
- Deploys the code to the Trigger.dev instance.
- Registers the tasks as a new version in the environment (prod by default).
You can also setup GitHub Actions to deploy your tasks automatically.
Arguments
The path to the project. Defaults to the current directory.
Options
The name of the config file found at the project path. Defaults to trigger.config.ts
The project ref. Required if there is no config file.
Load environment variables from a file. This will only hydrate the process.env
of the CLI
process, not the tasks.
Skip checking for @trigger.dev
package updates.
Defaults to prod
but you can specify staging
.
Create a deployable build but don’t deploy it. Prints out the build path so you can inspect it.
The platform to build the deployment image for. Defaults to linux/amd64
.
Turn off syncing environment variables with the Trigger.dev instance.
Common options
These options are available on most commands.
The login profile to use. Defaults to “default”.
Override the default API URL. If not specified, it uses https://api.trigger.dev
. This can also be set via the TRIGGER_API_URL
environment variable.
The CLI log level to use. Options are debug
, info
, log
, warn
, error
, and none
. This does not affect the log level of your trigger.dev tasks. Defaults to log
.
Opt-out of sending telemetry data. This can also be done via the TRIGGER_TELEMETRY_DISABLED
environment variable. Just set it to anything other than an empty string.
Shows the help information for the command.
Displays the version number of the CLI.
Self-hosting
These options are typically used when self-hosting or for local development.
Builds and loads the image using your local docker. Use the --registry
option to specify the
registry to push the image to when using --self-hosted
, or just use --push
to push to the
default registry.
Load the built image into your local docker.
Loads the image into your local docker after building it.
Specify the registry to push the image to when using --self-hosted
. Will automatically enable --push
.
When using the --self-hosted
flag, push the image to the registry.
The namespace to use when pushing the image to the registry. For example, if pushing to Docker Hub, the namespace is your Docker Hub username.
The networking mode for RUN instructions when using --self-hosted
.
Examples
Push to Docker Hub (self-hosted)
An example of deploying to Docker Hub when using a self-hosted setup: