Skip to content

Commit e0cece7

Browse files
authored
docs: deployments with local builds (#2645)
* docs: deployments with local builds Adds a section to the deployment docs page about the option to deploy using a locally built image. * Update installation link
1 parent 2f3f82f commit e0cece7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/deployment/overview.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,25 @@ TRIGGER_SECRET_KEY="tr_stg_abcd123"
182182

183183
Currently, we only support two environments: `prod` and `staging`. Multiple environments are on our roadmap which you can track [here](https://feedback.trigger.dev/p/more-environments).
184184

185+
## Local builds
186+
187+
By default we use a remote build provider to speed up builds. However, you can also force the build to happen locally on your machine using the `--force-local-build` flag:
188+
189+
```bash
190+
npx trigger.dev deploy --force-local-build
191+
```
192+
193+
<Tip>
194+
Deploying with local builds can be a useful fallback in cases where our remote build provider is experiencing availability issues.
195+
</Tip>
196+
197+
### System requirements
198+
199+
To use local builds, you need the following tools installed on your machine:
200+
201+
- Docker ([installation guide](https://docs.docker.com/get-started/get-docker))
202+
- Docker Buildx ([installation guide](https://github.com/docker/buildx#installing))
203+
185204
## Environment variables
186205

187206
To add custom environment variables to your deployed tasks, you need to add them to your project in the Trigger.dev dashboard, or automatically sync them using our [syncEnvVars](/config/config-file#syncenvvars) or [syncVercelEnvVars](/config/config-file#syncvercelenvvars) build extensions.
@@ -214,6 +233,8 @@ You can run the deploy command with `--log-level debug` at the end. This will pr
214233

215234
There should be a link below the error message to the full build logs on your machine. Take a look at these to see what went wrong. Join [our Discord](https://trigger.dev/discord) and you share it privately with us if you can't figure out what's going wrong. Do NOT share these publicly as the verbose logs might reveal private information about your project.
216235

236+
Sometimes these errors are caused by upstream availability issues with our remote build provider. In this case, you can try deploying with a local build using the `--force-local-build` flag. Refer to the [Local builds](#local-builds) section for more information.
237+
217238
#### `Deployment encountered an error`
218239

219240
Usually there will be some useful guidance below this message. If you can't figure out what's going wrong then join [our Discord](https://trigger.dev/discord) and create a Help forum post with a link to your deployment.

0 commit comments

Comments
 (0)