Learn how to deploy your tasks to Trigger.dev.
TRIGGER_SECRET_KEY
environment variable, and then any tasks you trigger will run against the deployed version:
version
parameter. This is useful when you want to run a task against a specific version of the code:
TRIGGER_VERSION
environment variable:
Trigger function | Parent task version | Child task version | isLocked |
---|---|---|---|
trigger() | 20240313.2 | Current | No |
batchTrigger() | 20240313.2 | Current | No |
triggerAndWait() | 20240313.2 | 20240313.2 | Yes |
batchTriggerAndWait() | 20240313.2 | 20240313.2 | Yes |
--skip-promotion
flag:
deploy
command will deploy to the prod
environment. If you want to deploy to a different environment, you can use the --env
flag:
staging
environment, with a new version number and an independent current version:
TRIGGER_SECRET_KEY
environment variable to the staging API key:
prod
and staging
. Multiple environments are on our roadmap which you can track here.
--log-level debug
at the end. This will print out a lot of information about the deploy. If you can’t figure out the problem from the information below please join our Discord and create a help forum post. Do NOT share the extended debug logs publicly as they might reveal private information about your project.
Failed to build project image: Error building image
Deployment encountered an error
No loader is configured for ".node" files
.node
files are native code and can’t be bundled like other packages. To fix this, add your package to build.external
in the trigger.config.ts
file like this:
Cannot find matching keyid
npm i -g corepack@latest