Files
triggerdotdev--trigger.dev/docs/v3/cli-deploy.mdx
nicktrn 35dbaedf69 v3: self-hosting (#1147)
* add amin email regex env var

* fix displayed init command for self-hosted setups

* shared env var to disable telemetry in cli and webapp

* pin sdk version during init

* if specified, add api url to dev command shown after init

* improve checkpoint support detection

* control forced checkpoint simulation via env var

* add public init to providers

* better checkpoint support check for coordinator

* add docker to coordinator image

* update docker provider containerfile

* bump remaining containers to node 20

* add infra image build to default publish workflow

* lockfile

* remove concurrency group from infra workflow

* add docker provider to build matrix

* fix var subst

* checkpoint test is docker specific

* enable v3 projects by default on self-hosted instances

* fix v3 setup command again

* add default posthog key

* self-hosting docs

* add latest tags to versioned infra and webapp builds

* some checkpoint errors should skip retrying

* add changeset

* shorten paragraph

* some docs updates

* update tunnelling section

* add registry setup section

* use correct cli push flag

* add checkout to v3 branch

* update the worker machine setup steps

* fix infra build

* small docs update

* remove unused feature function

* Revert "remove unused feature function"

This reverts commit cfe07887a12b6893dca8ce499964481a9b3dc9db.

* fix self-hosted v3 feature gate

* add note about missing arm support

* simplify helper script syntax
2024-06-10 14:13:04 +01:00

90 lines
2.4 KiB
Plaintext

---
title: "CLI deploy command"
description: "The `trigger.dev deploy` command can be used to manually deploy."
---
You run the command like this:
<CodeGroup>
```bash npm
npx trigger.dev@beta deploy
```
```bash pnpm
pnpm dlx trigger.dev@beta deploy
```
```bash yarn
yarn dlx trigger.dev@beta deploy
```
</CodeGroup>
<Warning>Will fail in CI if any version mismatches are detected. Ensure everything runs locally first using the [dev](/v3/cli-dev) command and don't bypass the version checks!</Warning>
It performs a few steps to deploy:
1. Optionally updates packages when running locally.
2. Typechecks the code.
3. Compiles and bundles the code.
4. Checks that [environment variables](/v3/deploy-environment-variables) are set.
5. Deploys the code to the cloud.
6. Registers the tasks as a new version in the environment (prod by default).
## Options
### Environment `--env` or `-e`
Defaults to `prod` but you can specify `staging`.
### Skip typecheck `--skip-typecheck` or `-T`
Skips the pre-build typecheck step.
### Build platform `--build-platform`
The platform to build the deployment image for. Defaults to `linux/amd64`.
### Log level `--log-level` or `-l`
The log level to use (debug, info, log, warn, error, none). Defaults to `log`.
### Set config filename `--config` or `-c`
The name of the config file, found where the command is run from. Defaults to `trigger.config.ts`.
### Set the projectRef `--project-ref` or `-p`
The project ref. Required if there is no config file.
### Self-hosted options
These options are usually only relevant to self-hosters or for local development.
#### Skip deploying the image `--skip-deploy` or `-D`
Load the built image into your local docker.
#### Self-hosted (builds locally) `--self-hosted`
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.
#### Registry `--registry`
<Snippet file="coming-soon-slim.mdx" />
The registry to push the image to when using --self-hosted.
#### Push image `--push`
When using the --self-hosted flag, push the image to the default registry. (defaults to false when not using --registry)
#### Tag the image `--tag`
<Snippet file="coming-soon-slim.mdx" />
Specify the tag to use when pushing the image to the registry.
{/* todo add options, remove the reference docs */}